This technique is similar to the PHP “sticky form” except more powerful and using only HTML5. This example uses jQTwith HTML5 local storage to create a calculator program. Later this can be easily wrapped in PhoneGap to create an app that can be submitted to the app store.
Unlike cookies, however, localStorage data is not sent across the wire with the browser requests it lives entirely in the client. Therefore, it’s feasible to store much more data than you would want to with cookies.
// When the saveSettings() function is called, it grabs the values //from the form inputs using jQT’sval() function //and saves each in a localStorage variable of the same name.