Browser Storage
Keep this draft after refresh, but do not treat it as a database shared by every user.
Keep this draft after refresh, but do not treat it as a database shared by every user.
Editing draft…
localStorage
draft = "weekend trip"No draft here
localStorage = emptyThe draft exists inside Laptop A's browser.
Local preferences and short-lived work: Theme selection, an unfinished draft, and non-sensitive interface preferences can remain in the browser so a page quickly restores recent work.
Its scope is usually one browser: It does not automatically sync to another device or make the data available to another user. Important information must also account for data clearing, private mode, and capacity limits.
Save the unsubmitted editing draft in browser storage and restore it after refresh; keep submitted content in the database through the API. Do not put secrets or authorization decisions in browser storage. Verify draft recovery after refresh and submitted content from another device.