Skip to main content
๐ŸŒ Public

Share visualization

Send this visualization to others.

Local Storage Example

Public visualization

Local Storage Example

0 stars1๐ŸŒ Public
LLaurens
Last edited Nov 24, 2020
Created on Oct 29, 2019
Forked from HTML Starter

This example demonstrates how to persist and retrieve user input across page reloads using the Web Storage API. It shows a text input and button that save a name to `window.localStorage`, then restore that value when the page is reloaded. The code also illustrates storing and retrieving structured JSON data, including updating nested objects and converting them back to strings for storage. The interface is plain HTML and JavaScript, with no external visualization libraries.

AI-generated description

A simple example showing how local storage works

Enter a name, press the button and reload the page. The name will be recovered from local storage.

Comments

Sign in to join the discussion.

MIT Licensed