Browser zoom and default text size
Infers page zoom and the person's default font size from layout measurements.
In one line
Can guess your page zoom and your default text size from how pages lay out
Infers page zoom and the person's default font size from layout measurements.
Zoom (50% to 500%) from devicePixelRatio and window size; default font size (usually 16 px, but 12 to 24 px settable) from computed em. Large values suggest low vision or older users.
What it can and can't do
What the user does: Nothing. It happens as the page measures itself while loading
It can
- Guess your zoom, from 50% to 500%
- Guess your default text size, often 16 pixels but set between 12 and 24
- Hint that you may have low vision or be an older user when sizes are large
It cannot
- Know for sure that you have low vision
- See your other accessibility settings from this alone
- Show a permission pop up; there is none
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 | 3 | 2007-10-26 | 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 | devicePixelRatio, outerWidth/innerWidth, getComputedStyle(root).fontSize, matchMedia(resolution) |
| 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 |
|---|---|---|---|---|
zoom | float | percent | 25 to 500 (steps 25,33,50,67,75,80,90,100,110,125,150,175,200,250,300,400,500) | Not listed |
default font size | float | px | 9, 12, 16, 20, 24 presets | Not listed |
Technical limits
- No direct API
- Safari iOS Dynamic Type affects CSS only with -apple-system-body
The story
What it is
The page can work out your zoom level and default text size.
For you
Pages look the right size for you when you zoom in or enlarge text. You do not see that the page measured those choices. They may hint that you have low vision.
For makers
Makers measure layout to keep pages usable. Trackers use zoom and font size as a unique clue, and they may guess age or vision needs.
Where you see it
| Type | Example | Apps |
|---|---|---|
| games | A browser game rescales its canvas when a player zooms in, so buttons stay clickable. | None named |
| accessibility | A site increases spacing and button sizes when it sees large text. | None named |
| media | A video site picks bigger controls when it sees a high zoom. | None named |
| ads | An ad profile may guess an older user from large default text. | None named |
| analytics | A fingerprinting script uses zoom and font size as extra clues. | None named |
| security | A fraud tool flags unusual display settings as an emulator or bot. | None named |
Risks
- Reveals vision needs
- Part of a fingerprint
Good uses and abuse
Legitimate uses
- Respect larger text
Known abuse
- Age or disability inference
Scores
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 1 of 5 | How revealing the data is |
| Utility | 3 of 5 | How useful it is to honest apps |
| Friction | 0 of 5 | How much the user has to do |
| Fingerprint bits | 2.5 | Rough identifying entropy, when known |
Related capabilities
Related
- Device pixel ratio and zoom. Can see your screen's sharpness factor, which also shifts when you zoom
Sources
How well checked: Inferred from related behavior.