Screen Resolution and Window Metrics: The Small Mismatches in Browser Profiles

12 min read

Open your profile's console and run one line:

console.log(screen.width, window.innerWidth, window.devicePixelRatio);

If the output looks like 1366 3840 1, you have a problem. The profile says it's a 1366x768 laptop. But the viewport is 3840 pixels wide, more than 2.8 times the claimed screen. That's like describing a Honda Civic with a 12-foot-wide interior. Spotting it takes no machine learning, just arithmetic.

It's an easy mismatch to miss. Canvas output looks fine, the proxy matches the timezone, and the profile still describes a machine that can't exist, because two numbers that should agree with each other don't.

The fix, once you know where to look, is usually five minutes of work. This tutorial covers the part few guides explain clearly: how screen and window values relate to each other, and what "impossible" looks like when a script runs the numbers.

What We're Building

By the end of this walkthrough, you'll be able to:

  1. Understand how page scripts cross-check window metrics
  2. Run diagnostic code to find inconsistencies in your own profiles
  3. Pick screen settings in JustBrowser that describe a real display
  4. Constrain the viewport in automation so the numbers stay coherent
  5. Recognise the usual causes before they eat an afternoon

You'll need a configured JustBrowser profile, or any multi-account browser, and about 15 minutes.

Prerequisites

  • A multi-account browser with at least one profile configured
  • Basic familiarity with the browser developer console (F12)
  • Understanding of screen resolution concepts (1920x1080, 4K, etc.)
  • A reference page that prints your values back, such as BrowserLeaks

If fingerprinting is new to you, start with the TLS fingerprinting overview.

Step 1: Understand What Scripts Actually Compare

A profile lets you set screen.width and screen.height, the values that report your monitor's resolution. Fair enough. Different profiles should present different machines.

But several related values have to stay internally consistent:

Screen dimensions:

  • screen.width: full monitor width in CSS pixels
  • screen.height: full monitor height in CSS pixels
  • screen.availWidth: monitor width minus OS UI (dock, taskbar)
  • screen.availHeight: monitor height minus OS UI

Window dimensions:

  • window.innerWidth: viewport width (what you see)
  • window.innerHeight: viewport height
  • window.outerWidth: total browser window width, frame included
  • window.outerHeight: total browser window height

Scaling:

  • window.devicePixelRatio: physical-to-CSS pixel ratio

And here's the constraint that matters: window dimensions cannot exceed screen dimensions.

A browser window can't be bigger than the monitor it's on. Obvious when stated plainly, easy to miss when everything else about the profile looks fine. Any setup that changes screen values independently from window values can produce an impossible configuration.

A 1920x1080 screen with a devicePixelRatio of 1 can have a maximized window up to 1920 pixels wide, with less height once the taskbar and the browser's toolbars take their share. It cannot have a 2560x1440 window. That window doesn't fit on that screen.

A consistency check like this is trivial to write:

// Example consistency check a page script might run
if (window.innerWidth > screen.width) {
  console.warn("window exceeds screen width");
}
if (window.innerHeight > screen.availHeight) {
  console.warn("window exceeds available height");
}

It runs in well under a millisecond. If your values don't add up, the rest of the profile can't make the machine it describes a real one.

Step 2: Run the Diagnostic

Before fixing anything, find out what's broken. Open your profile, launch the developer console (F12, or Cmd+Option+I on Mac) and run this:

console.log("=== Screen Metrics Diagnostic ===");
console.log("screen.width:", screen.width);
console.log("screen.height:", screen.height);
console.log("screen.availWidth:", screen.availWidth);
console.log("screen.availHeight:", screen.availHeight);
console.log("window.innerWidth:", window.innerWidth);
console.log("window.innerHeight:", window.innerHeight);
console.log("window.outerWidth:", window.outerWidth);
console.log("window.outerHeight:", window.outerHeight);
console.log("devicePixelRatio:", window.devicePixelRatio);
console.log("=== Consistency Checks ===");
console.log("innerWidth <= screen.width:", window.innerWidth <= screen.width);
console.log("innerHeight <= screen.availHeight:", window.innerHeight <= screen.availHeight);
console.log("outerWidth <= screen.width:", window.outerWidth <= screen.width);

Good output looks like this:

screen.width: 1920
screen.height: 1080
screen.availWidth: 1920
screen.availHeight: 1040
window.innerWidth: 1903
window.innerHeight: 947
window.outerWidth: 1920
window.outerHeight: 1040
devicePixelRatio: 1
innerWidth <= screen.width: true
innerHeight <= screen.availHeight: true
outerWidth <= screen.width: true

All checks are true. The window fits inside the screen, and availHeight is less than screen.height (a taskbar exists).

Bad output looks like this:

screen.width: 1366
screen.height: 768
window.innerWidth: 2560
innerWidth <= screen.width: false

That false is your problem. The profile reports a 1366px-wide screen with a 2560px viewport. No laptop has those dimensions.

Step 3: Choose Screen Settings in JustBrowser

Screen resolution is one of the identity parameters you set per profile. JustBrowser's engine applies screen size, colour depth, device pixel ratio and window geometry at the engine level, rather than through an extension.

Look for the screen options in the profile's fingerprint settings:

  • Screen width
  • Screen height
  • Color depth (usually 24)
  • Pixel ratio

The key point: don't set these independently. Pick a combination that corresponds to a real device configuration.

Common valid configurations:

ScreenPixel RatioWhat it represents
1920x10801Standard 1080p monitor
1366x7681Common laptop panel
2560x1440127" 1440p monitor
1536x8641.251080p at 125% scaling
1280x8002MacBook Air Retina (logical)
1440x9002MacBook Pro 13" Retina (logical)
2560x14401.54K at 150% scaling

For laptop profiles: stick to 1366x768 or 1920x1080 at ratio 1, or 1536x864 at 1.25. These are by far the most common.

For desktop profiles: 1920x1080 at ratio 1, or 2560x1440 at ratio 1. Anything above that gets rare. (Hot take: 4K profiles are usually more trouble than they're worth unless you specifically need one. Boring resolutions are fine.)

For Retina/HiDPI: the pixel ratio changes how resolution works. A MacBook Pro 14" set to "looks like 1512x982" runs at ratio 2, so the hardware pixels are 3024x1964. Report the logical resolution (1512x982) with a devicePixelRatio of 2.

Step 4: Check availHeight and availWidth

Here's a subtle one. screen.availHeight should be slightly less than screen.height, because it excludes the OS taskbar or dock.

On Windows with a 40px taskbar: availHeight = screen.height - 40 On macOS with a 25px menu bar: availHeight = screen.height - 25

A profile reporting screen.height: 1080 and screen.availHeight: 1080 is claiming there's no taskbar. Unusual, though not impossible. (Some people auto-hide the taskbar. Most don't.)

Worse is screen.availHeight greater than screen.height. That can't happen on any real machine.

If your tool lets you set availHeight manually, keep it 25-50px under the full height. If it doesn't, read the value back with the diagnostic from Step 2 and confirm it's plausible.

Step 5: Handle Window Resizing

Here's where it gets tricky: the numbers can be right at launch and wrong five minutes later.

Say you configure a 1366x768 screen and launch the profile on your actual 2560x1440 monitor. You drag the browser window to fill the real screen. Now window.innerWidth reports around 2540, wider than the 1366 the profile claims.

To keep things coherent:

  1. Don't maximize onto a monitor larger than the profile's screen. Use a fixed window size smaller than the reported screen
  2. Don't drag window edges while testing
  3. Set a specific viewport in automation scripts

One more caveat for automation. The API starts profiles headless unless you send {"headless": false} in the start request. A headless session has no real window, so its screen and viewport follow headless defaults. If the numbers matter, start the profile headed.

For Playwright or Puppeteer through the JustBrowser local REST API:

// Attach to the profile's existing context. Never browser.newContext(),
// which opens an incognito context outside the profile.
const browser = await chromium.connectOverCDP(cdpUrl);
const context = browser.contexts()[0];
const page = context.pages()[0] || await context.newPage();
await page.setViewportSize({ width: 1350, height: 700 }); // Under a 1366x768 screen

The viewport now sits inside the screen bounds. Viewport emulation can change other values the page reports as well, so rerun the Step 2 diagnostic in that page afterwards and check every line, not just innerWidth.

Step 6: Read the Values Back

Don't trust a single view of your own numbers. Read them back independently:

BrowserLeaks screen page: prints all screen and window values so you can verify the relationships yourself.

Your own console: rerun the Step 2 diagnostic after any change to the profile, the window size or the display it runs on.

If every consistency check prints true and the values match a row of the table in Step 3, you're done. This is a consistency check, not a score to chase, and the page that prints your numbers can't tell you whether any particular site will accept the profile. For more on reading test pages sensibly, see the fingerprint checker guide.

Common Errors and How to Fix Them

Error: window.innerWidth exceeds screen.width

Cause: the profile runs on a monitor larger than its reported screen, and the window grew to fill the real display.

Fix: constrain the viewport (see Step 5), or run the profile at a window size inside the reported screen.

Error: devicePixelRatio doesn't match resolution

Cause: a high pixel ratio (2 or 3) paired with a high-resolution screen (3840x2160), which is a combination no consumer display ships.

Fix: match ratio to resolution. 3840x2160 at ratio 1 is a 4K monitor. 1920x1080 at ratio 2 is a Retina-style display with a logical 1920x1080. 3840x2160 at ratio 2 would mean a physical 7680x4320 panel, which is 8K territory and extremely rare.

Error: screen.availHeight equals screen.height

Cause: the profile claims there's no taskbar, which is statistically uncommon.

Fix: set availHeight 25-50px under height, or use a configuration that derives it for you.

Error: outerWidth greater than screen.width

Cause: window chrome (the frame and borders) is being added on top of a window that's already at full width.

Fix: leave room for the chrome. On a 1920px screen, outerWidth shouldn't exceed 1920.

Error: Different values on page reload

Cause: screen values are being randomized per session, so a reload returns a different machine.

Fix: screen values should be stable per profile. Variation between profiles is fine. Variation inside one profile is a bug. Check for a "randomize per session" setting and disable it for screen metrics. It's one of those defaults that sounds clever and causes more problems than it solves.

Next Steps

With window metrics consistent, you've closed one of the quieter sources of mismatch. It's one piece of the puzzle. Other places where a profile's values can disagree with each other:

If you run paid campaigns from these profiles, ClickzProtect is a separate product that watches the traffic those campaigns receive. And if you run call-based campaigns alongside your multi-account work, VeloCalls handles the telephony side. For email, JustEmails is worth a look.

Sometimes the fix really is five minutes of viewport constraints. No new proxy, no fresh canvas settings, nothing clever. Just two numbers that finally agree with each other.

Frequently Asked Questions

Why does a screen.width vs window.innerWidth mismatch matter in a browser profile?

Real browsers have predictable relationships between screen dimensions and window dimensions. screen.width is your monitor's full width. window.innerWidth is the browser viewport. On a 1920px-wide monitor with a maximized window, innerWidth is at or just under 1920px. A profile that reports screen.width of 1366 but window.innerWidth of 3840 describes something physically impossible, and any page script can run that comparison.

What is devicePixelRatio and why does it matter for fingerprinting?

devicePixelRatio is the ratio between physical pixels and CSS pixels. A standard 1080p monitor has a ratio of 1. A Retina MacBook has a ratio of 2. A 4K monitor at 150% scaling has a ratio of 1.5. The value has to fit the reported screen resolution. A profile reporting 1920x1080 with a devicePixelRatio of 3 describes a display that doesn't exist in consumer hardware.

How do I check that my profile has consistent window metrics?

Open the browser console and run: console.log(screen.width, screen.height, window.innerWidth, window.innerHeight, window.devicePixelRatio, screen.availHeight). Verify that innerWidth is less than or equal to screen.width, innerHeight is less than screen.height (the taskbar takes space), and devicePixelRatio makes sense for the resolution. Then open BrowserLeaks' screen page to read the same values back independently.

Does maximizing or resizing the browser window change these values?

Yes, but it shouldn't produce contradictions in a correctly configured profile. When you maximize, window.innerWidth approaches screen.width. When you resize smaller, innerWidth decreases. The screen values stay constant, because they describe the monitor, not the window. Trouble starts when screen values are set independently of window values. A 1366px screen with a 1920px window is impossible.


Try JustBrowser

A multi-account browser for teams, built on a custom Chromium engine with native C++ integration, not an extension, patched on every upstream Chromium release. 40+ identity parameters, with real engine patches at the canvas / WebGL / audio / font / screen layer. REST API + CDP for Playwright, Puppeteer, Selenium. 7-day free trial, card required, cancel any time in the seven days and you are not charged. Then $9.99/month or $99.99/year, unlimited profiles, free team seats.

Get started → · How it differs from Multilogin / GoLogin / AdsPower

Tags
  • screen-resolution-fingerprint
  • window-metrics
  • devicepixelratio
  • viewport-consistency
  • multi-account-browser
  • buildinpublic
  • saasstudio
  • aiworkforce
  • buildwithclaude

Ready to manage multiple accounts?

Seven days free, then $9.99/month — one plan, everything included.

We'd like to use Google Analytics, a Google service, to understand how our website is used, and Google Ads and Microsoft Advertising to measure our ads and show them to people who have visited us. They set cookies in your browser and run only if you click Accept. You can change your choice at any time with Cookie settings. Cookie Policy

Sign-in cookies and the cookie that remembers this choice are always on; the website needs them to work.

Google Analytics, a Google service, helps us understand how our website is used, and Google Ads and Microsoft Advertising measure our ads and show them to people who have visited us. They set the cookies _ga, _ga_TVZHQ99TZW, _gcl_au, _uetsid and _uetvid, and, after a click on one of our ads, _gcl_aw or _uetmsclkid. They are now onoff in this browser. If your browser sends a Global Privacy Control or Do Not Track signal, they stay off. Cookie Policy