Thanks to localStorage. Saving, retrieving and removing temporary data is very easy. To save data, we call this function: localStorage.setItem(); To retrieve data, we call localStorage.getItem(); and to remove it we call localStorage.removeItem();.

Below is simple source code to show you how this three functions work:

You can see live result of these codes here:


Habibie is an Indonesian freelance PHP, MySQL, HTML5, CSS3, JavaScript, Java, Python and C# programmer. He also do graphics design, video editing, visual effects, animation, 3D modeling and making games.

Related Post

How to save, retrieve and remove data with JavaScript and HTML5
Tagged on: