Click here to Skip to main content
15,905,558 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
i have used a session variable to store user name and password.. what i wanted is this session variable to be stored as long as my web application is online i.e. for almost 14 hours a day...
I have not used any timeout mechanism... will the value of session flushed after certain interval?? should i write a code to keep session value alive till long period???
Posted

 
Share this answer
 
For that you can use HTML5 Web Storage.

Quote:
With HTML5, web pages can store data locally within the user's browser.Earlier, this was done with cookies. However, Web Storage is more secure and faster. The data is not included with every server request, but used ONLY when asked for. It is also possible to store large amounts of data, without affecting the website's performance.The data is stored in key/value pairs, and a web page can only access data stored by itself.


There are two new objects for storing data on the client:

localStorage - stores data with no expiration date
sessionStorage - stores data for one session

Check this for more info. HTML5 Web Storage
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900