Cookies and web storage help sites remember information between visits. A cookie can be included in matching requests, while local storage is read and written by permitted page scripts within its origin.

The purpose matters. A site may remember a preference or a saved reading list; another may use identifiers for measurement. Similar mechanisms can support different practices.

Browser controls let you inspect and clear site data, with consequences such as signing out or losing local preferences. Understand what is stored and how clearing it affects the experience.

A few starting points
  1. Inspect the site-data controls in your browser.
  2. Connect stored state to a visible feature.
  3. Expect local preferences to reset when data is cleared.

Picture this situation.

Consider clearing site data on a borrowed computer. A locally stored preference may disappear even though the public article remains available.

A second way to look.

Start with a specific piece of information. Identify why it is needed, who can see it, and the event that should bring its use to an end.

Follow a related question

State the job and relevant input.

A prompt that states the work

Write the next action before leaving.

Leave a note for your return

Keep learning

Related background to continue exploring this subject.

MDN: privacy on the web MDN: web security
Look a little closer