Thursday 29 December 2011

Web Storage in HTML5

HTML5 offers two new objects for storing data on the client:
  • localStorage - To store data with no time limit.
  • session Storage -To  store the data for one session.
Earlier, the data was stored with cookies. But now cookies are not suitable for storing large amounts of data , because they are passed  every request to the server, it makes  slow and in-effective.

In HTML5, the data is not passed  every server request, but used only when asked for. It is possible to store large amounts of data without affecting the website's performance.

The data can store in different areas for different websites, and a website can only access data stored by itself.

No comments:

Post a Comment