How to save some values permanently on a browser?

后端 未结 2 1658
走了就别回头了
走了就别回头了 2021-01-28 04:11

I have some login information, let say user name, login email Id and location.

I want keep this information in the browser even after the user logout an

2条回答
  •  [愿得一人]
    2021-01-28 05:04

    I think you could use cookies for storing data on client side, follow this link

    http://www.tutorialspoint.com/jsp/jsp_cookies_handling.htm

    set storing age using the method public void setMaxAge(int expiry);

    Also another solution is local storage in HTML5 but this is supported only in latest browsers.

    http://www.w3schools.com/html/html5_webstorage.asp

    http://diveintohtml5.info/storage.html

    hope these links will help you

提交回复
热议问题