Html5 has lot of advantages. This HTML made the easy for the web designers. While designing a Website, in any situation you may come across to store the data. The data needs to be accessed in many pages. For this problem the solution is WebStorage concept in the HTML5.
There are two kinds of storages, They are
1. LocalStorage
2. SessionStorage
LocalStorage: Here the data is stored for ever. There is no time limit for variable to expire.
Eg. localStorage.id="abc";
Here in this example.
"id" is the variable. "abc" is the value. This says that the value "abc" is stored in the variable "id".
To use this variable in the other page Just use the statement.
alert("localStorage.id");
SessionStorage: Here the data is stored only for one session. The data is lost once you close the browser Window.
Eg. sessionStorage.id="abc";
This is similar to the LocalStorage except the expiration time of the variable.
There are two kinds of storages, They are
1. LocalStorage
2. SessionStorage
LocalStorage: Here the data is stored for ever. There is no time limit for variable to expire.
Eg. localStorage.id="abc";
Here in this example.
"id" is the variable. "abc" is the value. This says that the value "abc" is stored in the variable "id".
To use this variable in the other page Just use the statement.
alert("localStorage.id");
SessionStorage: Here the data is stored only for one session. The data is lost once you close the browser Window.
Eg. sessionStorage.id="abc";
This is similar to the LocalStorage except the expiration time of the variable.
ReplyDeleteThis is an interesting blog that you have posted,Good job.
Html5 Training in Chennai
DOT NET Training in Chennai
c# training in chennai
dot net classes in chennai
mvc training in chennai
Best DOT NET Training institute in Chennai
QTP Training in Chennai
LoadRunner Training in Chennai