Storage and cookie availability flags
Tests whether cookies, localStorage, sessionStorage and IndexedDB work.
In one line
Can check whether cookies and site storage work in your browser
Tests whether cookies, localStorage, sessionStorage and IndexedDB work.
Four booleans plus openDatabase and addBehavior legacy checks. Almost always all true, so low entropy, but they flag locked-down privacy modes and blocked storage.
What it can and can't do
What the user does: Nothing. It happens when the page loads
It can
- Test cookies, localStorage, sessionStorage, and IndexedDB
- Spot a locked down privacy mode or blocked storage
- Choose how to save your settings
It cannot
- See the contents of your storage for other sites
- See which sites you visited
- Learn much; almost everyone gets all yes
- See your cookies from other sites
Browser support
| Browser | Status | First version | Released | Note |
|---|---|---|---|---|
| Chrome | Supported | 1 | 2008-12-11 | None |
| Edge | Supported | 12 | 2015-07-29 | None |
| Firefox | Supported | 1 | 2004-11-09 | None |
| Safari | Supported | 4 | 2009-06-08 | None |
| Safari on iPhone | Supported | 3.2 | 2010-04-03 | None |
| Chrome on Android | Supported | 18 | 2012-06-27 | None |
| Samsung Internet | Supported | 1.0 | 2013-04-27 | None |
How a site asks for it
| API | navigator.cookieEnabled, window.localStorage, sessionStorage, indexedDB.open() |
| How access is granted | none |
| What the user sees | None |
| Needs a secure context (HTTPS) | No |
| Needs a user gesture | No |
| How long it lasts | read fresh on every page load; nothing stored |
| How to take it back | none needed (no grant) |
| Inside an iframe | Readable from cross-origin iframes too (same values) |
Typical flow
- Page script reads the value
- No prompt is shown
Data you get
Shape: object
How often: static per session
| Field | Type | Unit | Range | Precision |
|---|---|---|---|---|
cookieEnabled, localStorage, sessionStorage, indexedDB | boolean | None | true or false each | Not listed |
Technical limits
- Booleans only
The story
What it is
Checks whether cookies and browser storage work, which shows locked down privacy settings.
For you
You never see it. A site quickly tests whether it can save a small note in your browser. If it cannot, you may see a message like Please enable cookies, or a feature may stop working.
For makers
Sites need storage for logins, carts and settings. They check first so the page does not break. The answers also reveal locked down privacy settings, so fraud teams use them too.
Where you see it
| Type | Example | Apps |
|---|---|---|
| shopping | A shop tests whether cookies work, and if not, shows a warning that your cart will not be saved. | None named |
| games | A browser game checks if it can save progress, and warns that scores will not be kept when storage is blocked. | None named |
| banking | A bank login shows a clear Please enable cookies message instead of a blank error. | None named |
| security | A bot defence tool notes visitors with all storage blocked as slightly more risky. | None named |
| analytics | An analytics tag falls back to server side counting when it cannot save a cookie. | Google Analytics |
| education | An online course asks students to enable storage so lesson progress is saved. | None named |
| ads | An ad vendor skips cookie based targeting if storage is blocked. | None named |
Risks
- Low value alone
- Highlights privacy settings
Good uses and abuse
Legitimate uses
- Graceful degradation
Known abuse
- Fingerprint bits
Scores
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 1 of 5 | How revealing the data is |
| Utility | 2 of 5 | How useful it is to honest apps |
| Friction | 0 of 5 | How much the user has to do |
| Fingerprint bits | 0.6 | Rough identifying entropy, when known |
A real example: LinkedIn
Storage features detected (BleepingComputer). Read by the LinkedIn APFC fingerprint script (48 features, alleged by BrowserGate, partly confirmed by BleepingComputer).
History
- 2016-06, paper: AmIUnique: cookies enabled 0.25 bits, local storage 0.36 bits
Sources
- fingerprintjs source: cookies_enabled
- fingerprintjs source: local_storage
- fingerprintjs source: indexed_db
- AmIUnique: Beauty and the Beast, Laperdrix et al. 2016 (attribute entropy)
How well checked: Checked against real behavior.