-
Book Overview & Buying
-
Table Of Contents
jQuery Mobile Cookbook
By :
Cookies was the mechanism used to store client-side information earlier. But a cookie can only store up to 4 KB of data, which is sent to the server with every single request. Web Storage is the client-side storage standard introduced with HTML5. It has two types: Local Storage and Session Storage . Data stored in Session Storage is available till the user's session is active, and is lost once the session ends. Local Storage data is persisted across sessions. This recipe shows you how to use Local Storage and Session Storage.
Copy the full code of this recipe from the code/11/storage folder. You can launch this code using the URL: http://localhost:8080/11/storage/main.html.
The steps to be followed are:
Create main.html with its page content having three text fields and a Save button:
<div data-role='content'>
<div data-role='fieldcontain'>
<label for='nostore'>No Storage</label>
<input type...
Change the font size
Change margin width
Change background colour