/ Published in: JavaScript

This is just a simple explanation of how to use the HTML5 local storage in javascript. The link has a more thorough explanation and an example for those interested. The examples to save, retrive, and clear are marked below.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
//Store "something" to the local storage under the name "stored_item". localStorage["something"]="stored_item"; // Get "item" from the localStorage item "something"; var stored_item = localStorage["something"]; // Clear the local storage variable "something" localStorage.removeItem("something")
URL: http://fatfolderdesign.com/295/html5/making-offline-sitesapplications
Comments
