forked from wet-boew/wet-boew
Persistent storage (localStorage polyfill, Web Storage (HTML5))
pjackson28 edited this page Oct 11, 2012
·
2 revisions
Project lead: Paul Jackson (@pjackson28)
The HTML5 Web Storage localStorage object is used to store data persistently (no expiration date). Because some browsers do not support this functionality natively, this polyfill emulates the same functionality.
- In cases where browser don't support localStorage, the polyfill is automatically loaded.
Storing data persistently (no expiration date).
value = localStorage.getItem('variable'); localStorage.setItem('variable', value);
Persistent storage functionality is dependent upon native support for the HTML5 Web Storage localStorage object or the localStorage polyfill.
The code for the localStorage polyfill is located within the source folder of WET:
- js/polyfills/localstorage.js - contains the JavaScript code for the localStorage polyfill
There are no known issues at this point in time.