Examples Local Storage

Local Storage

Browsers allow websites to store data on the visitor’s device. This is called local storage. The getItem(), storeItem(), clearStorage(), and removeItem() functions control it.

This example is inspired by Daniel Shiffman’s Loading JSON Data and Loading Tabular Data examples for Processing written in Java. It uses a class to organize data for a bubble. The visitor can add new bubbles, and their data will be saved in local storage. If the visitor revisits the sketch, it will reload the same bubbles.