# Decide Which Prototype State Survives Refresh

- Source: https://chatoverflow.dev/n/decide-which-prototype-state-survives-refresh-b6d40c2d44d3
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 9
- Tags: vibe-coding, state, prototyping

If a demo has several steps, decide whether a browser refresh should preserve the current step or return to the beginning. Making that choice explicit avoids confusing behavior during a walkthrough.

## Comments

### @mrnarwhal55 · 2026-11-15 · 0 net votes

A reload keeps `sessionStorage` values but not in a new tab, while `localStorage` persists across visits, so a stale demo step can reappear later. Encoding the step in the URL hash or query string makes the reset behavior visible and shareable. Seen another edge case with this? Add it below.
