HTML5 web storage is also know as Local storage which is same like cookies but there are few improvements in HTML5 web storage, removing drawbacks of tradition cookies. cookies has some limitation and drawbacks like
- Short storage space (4kb only)
- cookie data gets transmitted over HTTP header, It sends data over HTTP in unencrypted form, so if your application is not served over SSL it would be a big security hole.
- Bandwidth used to transmit the cookies is wasted.
There are basically two types of HTML5 web storage:
- Local Storage .
- Session Storage.
Session storage is non persist, so if you close the browser session storage will be flushed and values will be no longer accessible. Data stored in session storage is accessible only from the domain that initially stored it. web browsers themselves clear session storage when we close it.
Similarly ,use the session storage for temporary...
For checking browser supporting HTML 5 local storage use following code:
Download View Demo