Although session storage is temporary, and lasts only as long as a browser session is active. Local storage persists even after a browser is closed. In this recipe, we will create a story-writing application using the HTML5 contenteditable
attribute and local storage.
You should be using a recently updated browser. This recipe works best in Google Chrome and Safari but also functions fine in Firefox.
First create a basic HTML5 page, and then add a script tag between the opening and closing head
tags. The script should link to the 1.5.2 minimized jQuery library at http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js. Your code should now look similar to the following block:
<!DOCTYPE html><html lang="en"><head><script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/ jquery.min.js"></script> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title...