Learn

284 articlesCategory: All
Network

Risks of cookies, localStorage, and IndexedDB

Websites can store information inside the browser.

The best-known mechanism is cookies. There are also storage areas such as and . They are used to store login state, settings, carts, identifiers, and app data.

They are convenient mechanisms, but for anonymity, they become strong correlation clues.

Even if you change your IP address, if the same cookie is sent, you are treated as the same browser. Even if you use a or , activity can still connect if you use the same storage area as your real-name environment.

This article organizes how storage areas inside the browser relate to anonymity. Details are covered in "Differences between cookies, sessionStorage, and localStorage."

Storage areas inside the browser

s, localStorage, and IndexedDB are mechanisms websites use to store information on the browser side.

Storage areaMain usesAnonymity caution
CookieLogin state, sessions, identifiersSent during requests
localStorageSettings, simple dataUsed from JavaScript
IndexedDBLarger app dataWeb app information remains
sessionStorageTemporary storage per tabState remains during the session
CacheImages and scriptsBecomes a clue to browsing history

These make the Web convenient.

However, as long as you keep using the same browser, behavior becomes easier to connect over time.

Why this becomes a problem for anonymity

For anonymity, the problem is that actions by the same user become linked.

Cookies and localStorage create that link. For example, after viewing a site from your home IP, if you access the same site through a VPN but the same cookie is sent, it is recognized as the same browser.

SituationWhat happensProblem for anonymity
Changing only the IPThe same cookie is still sentIt is clear that this is the same browser
Anonymous browsing after real-name loginStorage areas remainBehavior connects with the real-name environment
Multiple accounts in the same browserStored states mixAccount separation breaks
Using a Web appData remains in IndexedDBPast use remains
Cache remainsRevisited pages or viewed items remainIt becomes a trace on the device

VPNs and Tor change how the communication route appears.

Storage areas inside the browser are a separate issue.

When deleting cookies is not enough

Deleting cookies is useful.

However, if localStorage, IndexedDB, cache, service workers, or related site data remain, Web app state may remain.

What remainsContentCaution
localStorageSite settings or identifiersMay not disappear by deleting only cookies
IndexedDBWeb app dataLarge amounts of information remain
CacheRetrieved filesBecomes a trace of browsing or use
Service WorkerOffline processing and notificationsMay keep site functions active in the browser
Login stateService-side sessionDoes not stay entirely within the browser

For anonymous activity, it is important to separate the real-name browser and anonymous browser.

A design that does not mix them is more stable than handling it by deletion every time.

What to check

When handling storage areas inside the browser, think about what not to mix before thinking about what to delete.

Check itemReason
Whether you separated browsers for real-name use and anonymous useAvoid mixing storage areas
Whether you are using the same site with real-name and anonymous identitiesAvoid account correlation
Whether you checked storage areas other than cookieslocalStorage and IndexedDB remain
Whether you separated browser profilesAlso separate extensions and history
Whether you kept Tor Browser's standard settingsAvoid making yourself stand out through custom settings

For high-risk activity, consider separating not only the browser but also the OS user, device, and communication route.

Prioritize separation over deletion

Cookies and storage areas can also be deleted.

However, a process that requires perfect deletion every time is fragile. Forgotten deletion, logging in again, storage areas for other sites, sync settings, and similar factors cause mixing.

MethodBenefitCaution
Delete every timeEasy to startForgotten deletion or missed targets happen
Separate browserMakes real-name and anonymous use easier to separateSeparate extensions and settings too
Separate profileCan separate within the same browserRequires a clear habit to avoid opening the wrong one
Tor BrowserDesigned to reduce storage and identificationDo not change standard settings
Separate deviceAllows strong separationManagement cost increases

For low risk, profile separation may be enough in some cases.

For high risk, consider separating the device or OS too. What matters is deciding how much separation you need based on the threat model.

Common mistakes

Failures around browser storage areas happen during familiar routines.

MistakeWhat happens
Posting anonymously from the usual browserMixes with real-name cookies and history
Only turning on a VPNCookies are still sent unchanged
Feeling safe after only logging outlocalStorage and IndexedDB remain
Using the same extensionsThe browser environments become similar
Not turning off cloud syncHistory and settings spread across devices

For anonymity, check the communication route and the state inside the browser at the same time.

Basic policy for anonymous activity

For handling cookies and storage areas, make "do not mix" the basic rule rather than "delete."

Once you decide on a browser for anonymous activity, do not use real-name services in that browser. Do not use anonymous accounts in the real-name browser. Separate cloud sync and password sync too. This simple rule becomes a strong countermeasure over the long term.

PolicyMeaning
Separate usesDo not mix real-name use and anonymous use
Check syncDo not spread history or settings to other devices
Separate loginsAvoid account correlation
Regularly check storage areasDo not leave unnecessary data
For high risk, separate devices tooDo not rely only on browser separation

Summary

Cookies, localStorage, and IndexedDB are mechanisms websites use to store information in the browser.

They are convenient features, but for anonymity, they become clues that link actions by the same browser.

Even if you change your IP address, if the same cookies or storage areas remain, you may be treated as the same browser or environment.

For anonymity, think about the communication route and browser storage areas separately.

It is important not to mix real-name and anonymous environments, and to use a dedicated browser or dedicated profile as needed.

Related tools

WebRTC Leak Test

BrowserLeaks WebRTC

An external resource related to this article. Open it only when it fits your situation and threat model.

Why it is listed: It can help with the article topic, but it is outside Anonymity Sense and should be checked before use.

URL : https://browserleaks.com/webrtc

Open external site
Anonymous communication

Tor Project

An external resource related to this article. Open it only when it fits your situation and threat model.

Why it is listed: It can help with the article topic, but it is outside Anonymity Sense and should be checked before use.

URL : https://www.torproject.org/

Open external site

Related articles