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:

Related Post

How to save, retrieve and remove data with JavaScript and HTML5