Skip to Content
Platform.Ontology

Screen width and height

The monitor or phone screen size in CSS pixels, plus the usable area.

Gets silentlyScreen and windowsScreenWeb browsersWhen the page loadsWhile you use it

In one line

Can see your screen width and height, and the usable area, in page units

The monitor or phone screen size in CSS pixels, plus the usable area.

Identifies device model families (iPhone 390x844) and monitor setups (1920x1080, 2560x1440, 3440x1440). Safari 26 and Firefox protections spoof or round it for known scripts; Firefox RFP returns the window size.

What it can and can't do

What the user does: Nothing. It happens when the page loads.

It can

  • Check the screen's width and height
  • Check the usable area, without the taskbar
  • Choose a layout that fits

It cannot

  • Learn the true pixel count on scaled or Retina screens
  • See your other monitors
  • Tell your monitor model

Browser support

BrowserStatusFirst versionReleasedNote
ChromeSupported12008-12-11None
EdgeSupported122015-07-29None
FirefoxSupported12004-11-09None
SafariSupported12003-06-23None
Safari on iPhoneSupported12007-06-29None
Chrome on AndroidSupported182012-06-27None
Samsung InternetSupported1.02013-04-27None

How a site asks for it

APIscreen.width, screen.height, screen.availWidth, screen.availHeight
Browser compat keysapi.Screen.width
api.Screen.height
api.Screen.availWidth
How access is grantednone
What the user seesNone
Needs a secure context (HTTPS)No
Needs a user gestureNo
How long it lastsread fresh on every page load; nothing stored
How to take it backnone needed (no grant)
Inside an iframeReadable from cross-origin iframes too (same values)

Typical flow

  1. Page script reads the value
  2. No prompt is shown

Data you get

Shape: object
How often: static per session

FieldTypeUnitRangePrecision
width, heightintegerCSS px320 to 7680; typical 1920x1080, 1440x900, 390x844, 360x800exact, except under RFP or AFP
availWidth, availHeightintegerCSS pxless than width, height by taskbar sizeexact

Technical limits

  • Does not give physical size or PPI
  • iOS reports points, not pixels, so many iPhones share values

The story

What it is

The size of your monitor or phone screen in page units, plus its usable area.

For you

You never see it read. It is why a site can fit a big monitor or a small phone, and send the right layout from the start.

For makers

It is one of the oldest and most common signals. Makers use it for layout and analytics. Trackers combine it with other facts to tell your device apart from similar ones.

Where you see it

TypeExampleApps
gamesA browser game sets its canvas to fit the screen and chooses touch or mouse controls.None named
analyticsA site team sees that 55 percent of visitors use 1920 by 1080 and designs for it.Google Analytics
adsAn ad server picks a banner size that fits the screen, and also keeps the size in a device profile.None named
securityA fraud service sees a screen size that no real device has and flags the visit as an emulator.None named
shoppingA store picks a layout and image sizes for phone, tablet or wide monitor.None named
videoA streaming site picks its first video quality from the screen size.YouTube

Risks

  • Fingerprint clue
  • Reveals device model

What the platform says

  • MDN: Screen. Documents the object a page reads to learn the width and height of the user screen.

Good uses and abuse

Legitimate uses

  • Responsive layout
  • Choose image size

Known abuse

  • Device identification
  • Monitor setup profiling

Scores

ScoreValueMeaning
Sensitivity1 of 5How revealing the data is
Utility5 of 5How useful it is to honest apps
Friction0 of 5How much the user has to do
Fingerprint bits4.8Rough identifying entropy, when known

A real example: LinkedIn

Collector key(s): screenResolution, availableScreenResolution. BleepingComputer confirms screen resolution.

History

  • 2016-06, paper: AmIUnique: screen resolution 4.83 bits
  • 2025-09, Safari 26: Advanced Fingerprinting Protection stops known fingerprinting scripts reading screen dimensions reliably
  • 2025-11, Firefox 145: Taskbar and dock size hidden from screen APIs in all modes; wider protections in Private Browsing and ETP Strict

Sources

How well checked: Checked against real behavior.

On this page