HTML5 Web Storage / PDF







Sample of the pdf document :


What is HTML5 Web Storage?
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.

Browser Support

Web storage is supported in Internet Explorer 8+, Firefox, Opera, Chrome, and Safari.
Note: Internet Explorer 7 and earlier versions, do not support web storage.

localStorage and sessionStorage 
There are two new objects for storing data on the client:
  •      localStorage - stores data with no expiration date
  •      sessionStorage - stores data for one session
Before using web storage, check browser support for localStorage and sessionStorage:
if(typeof(Storage)!=="undefined")
  {
  // Yes! localStorage and sessionStorage support!
 
// Some code.....
  }
else
  {
  // Sorry! No web storage support..
  }


The localStorage Object
The localStorage object st.......






Click here for  Download PDF / FREE

0 commentaires: