Skip to content
Lab notebookBy 8 min read

What makes a page think it is a phone?

Four settings can say it: window width, mobile mode, user agent, pixel density. Turn them on one at a time and see which of ten tests answers. The first dial position is mobile mode alone, on a 1280 px window.

Window width

viewport_width

Mobile mode

viewport_mobile

User agent

user_agent

Pixel density

device_scale_factor

The page

<meta name=viewport>

4 of 10

tests say phone.

Page laid out at
1280 px
Picture file
1x
Image
1280 x 844

Size

  • CSS width querydesktop
  • CSS device-width querydesktop
  • picture source by widthdesktop

Input

  • Pointer queryphone
  • Hover queryphone
  • Touch pointsphone
  • Client hintphone

User agent

  • User agent sniffdesktop

Density

  • Resolution querydesktop
  • srcset pickdesktop
Lab notebookRun on 12 November 2026Chromium 15349 settings

The notebook, entry by entry

Each entry changes one thing from the first line and writes down what ten tests said. The tests are the ones a page can run on itself: three about size, four about input, one about the browser name, two about density. The dials above replay every entry. The real option names come from the CurlShot request, and the page was opened by the CurlShot renderer itself.[1]

Entry 1Baseline: a desktop browser

0 of 10 say phone

Question
What does the page say before anything is changed?
Run
Window 1280 x 844, desktop user agent, density 1, mobile mode off, page with a viewport tag.
Saw
0 of 10 tests said phone. The srcset picked the 1x file and the picture element took its wide source. The page was served as a desktop page.
So
Every later entry changes one thing from this line.

Entry 2Only the width: 390 px

3 of 10 say phone

Question
Is a narrow window enough to make a page think it is a phone?
Run
viewport_width=390. Nothing else changed.
Saw
3 of 10 said phone: max-width, device-width, picture. The pointer was still fine, hover still worked, no touch points, the client hint said ?0 and the user agent was the desktop one.
So
A responsive stylesheet is satisfied by width alone. Anything that asks about touch, pointer or the browser name still sees a desktop with a small window.

Entry 3Only mobile mode, at 1280 px

4 of 10 say phone

Question
Does mobile mode change the width?
Run
viewport_mobile=true on the 1280 px window.
Saw
4 of 10 said phone: coarse, hover, touch, hint. The layout was still 1280 px wide, so none of the width tests moved, and the user agent string was still the desktop one. The request carried Sec-CH-UA-Mobile: ?1. The image was 1280 x 844.
So
Mobile mode is the input setting, not the size setting. It is the only one that touches the touch, pointer, hover and client-hint tests.

Entry 4Only the user agent: iPhone Safari

1 of 10 say phone

Question
Does a phone user agent make the page lay out like a phone?
Run
user_agent set to the iPhone string of the iphone_15_pro preset, window still 1280 px, mobile mode off.
Saw
1 of 10 said phone: the user agent test. The server saw an iPhone and served its phone page. Every CSS test, the touch test and the density tests stayed desktop, and the client hint said ?0, so the string and the hint disagreed.
So
Only a server or a script that reads the user agent follows this setting. The renderer source says it aligns the client hints only for its own default string and leaves a user agent you send exactly as sent, so the hint stays at desktop.

Entry 5Only the pixel density: 3

2 of 10 say phone

Question
Is a dense screen a sign of a phone?
Run
device_scale_factor=3 on the 1280 px window.
Saw
2 of 10 said phone, both about density: the resolution query and the srcset pick (the 3x file). Nothing about size, input or the browser name moved. The image was 3840 x 2532, three times wider than the window.
So
Density says how sharp the picture is, not what kind of device it is. The laptop presets use density 2 as well.

Entry 6All four together, and the preset

10 of 10 say phone

Question
What is a device preset, in these terms?
Run
Width 390, mobile on, iPhone user agent, density 3. Then the iphone_15_pro preset alone.
Saw
10 of 10 said phone for the four switches, and 10 of 10 for the preset, with the same answer on every test. The four-switch image was 1170 x 2532; the preset is 393 px wide, so its image is 1179 x 2556.
So
A preset is these four settings set together, with its own touch flag. Send one of them yourself and it wins over the preset.

Entry 7All 16 combinations, with a viewport tag

Question
Do the settings interfere with each other?
Run
Every combination of the four settings: 2 x 2 x 2 x 2 = 16 runs, on a page with a viewport tag.
Saw
No. Each of the 10 tests followed exactly one setting in all 8 pairs of runs that differ in that setting. Width moved 3 tests, mobile mode 4, the user agent 1, density 2: 10 in all, none counted twice.
So
The grid below is the whole result. Read a column to see which setting a test listens to.

All 16 settings, one grid

Every row is one run on a page with a viewport tag. "phone" means the test says phone. Read a column and one setting explains it: the size tests turn on with the width, the input tests with mobile mode, the user agent test with the string, the density tests with the density. The two layout columns come from the same runs.

SettingsSizeInputUser agentDensityResult
WidthMobileUADens.max-widthdevice-widthpicturecoarsehovertouchhintUA string2dppxsrcsetLayout pxImage px
1280offdesktop1x----------12801280 x 844
1280offdesktop3x--------phonephone12803840 x 2532
1280offiPhone1x-------phone--12801280 x 844
1280offiPhone3x-------phonephonephone12803840 x 2532
1280ondesktop1x---phonephonephonephone---12801280 x 844
1280ondesktop3x---phonephonephonephone-phonephone12803840 x 2532
1280oniPhone1x---phonephonephonephonephone--12801280 x 844
1280oniPhone3x---phonephonephonephonephonephonephone12803840 x 2532
390offdesktop1xphonephonephone-------390390 x 844
390offdesktop3xphonephonephone-----phonephone3901170 x 2532
390offiPhone1xphonephonephone----phone--390390 x 844
390offiPhone3xphonephonephone----phonephonephone3901170 x 2532
390ondesktop1xphonephonephonephonephonephonephone---390390 x 844
390ondesktop3xphonephonephonephonephonephonephone-phonephone3901170 x 2532
390oniPhone1xphonephonephonephonephonephonephonephone--390390 x 844
390oniPhone3xphonephonephonephonephonephonephonephonephonephone3901170 x 2532

Which setting moves which tests

  • Window width viewport_width

    3 of 10: max-width, device-width, picture

  • Mobile mode viewport_mobile

    4 of 10: coarse, hover, touch, hint

  • User agent user_agent

    1 of 10: UA string

  • Pixel density device_scale_factor

    2 of 10: 2dppx, srcset

What each test reads

  • CSS width query

    @media (max-width: 600px)

  • CSS device-width query

    @media (max-device-width: 600px)

  • picture source by width

    <source media="(max-width: 600px)">

  • Pointer query

    @media (pointer: coarse)

  • Hover query

    @media (hover: none)

  • Touch points

    navigator.maxTouchPoints > 0

  • Client hint

    navigator.userAgentData.mobile and the Sec-CH-UA-Mobile header

  • User agent sniff

    /Mobi/.test(navigator.userAgent), and the same test on the request header

  • Resolution query

    @media (min-resolution: 2dppx)

  • srcset pick

    img srcset="1x, 2x, 3x" and currentSrc

The hint column is the client hint a server receives as Sec-CH-UA-Mobile and a script reads as navigator.userAgentData.mobile; it says whether the browser is on a mobile device.[3] The coarse column is the pointer query: a finger counts as coarse, a mouse as fine.[2] The srcset column is the picture the browser chose from 1x, 2x, 3x: with density 2.625 it took the 3x file, the next size up.[4]

Where the settings meet

The grid says the settings do not interfere. Two more entries are where it stops being true.

Entry 8Take the viewport tag away

Question
What if the page has no viewport meta tag?
Run
The same 16 runs on a page without <meta name="viewport">. Then 390 px wide with mobile mode on, the case that went wrong.
Saw
With mobile mode on, a 390 px window laid the page out 980 px wide, the width a phone browser falls back to for a page without a viewport tag. The width query and the picture source stopped matching, so 5 of 10 said phone instead of 7. The image was still 390 px wide: the page was drawn 980 px wide and shrunk to fit. Mobile mode off at 390 px behaved as before (layout 390 px). These two tests, max-width and picture, were the only ones that followed a second setting.
So
Without a viewport tag, width and mobile mode stop being independent. A screenshot of a tag-less page in mobile mode shows a small desktop page, not a phone layout.
The same 16 settings on a page with no viewport tag

With mobile mode on and a 390 px window, the layout column reads 980, and the width, picture and max-width cells turn back to a dash.

SettingsSizeInputUser agentDensityResult
WidthMobileUADens.max-widthdevice-widthpicturecoarsehovertouchhintUA string2dppxsrcsetLayout pxImage px
1280offdesktop1x----------12801280 x 844
1280offdesktop3x--------phonephone12803840 x 2532
1280offiPhone1x-------phone--12801280 x 844
1280offiPhone3x-------phonephonephone12803840 x 2532
1280ondesktop1x---phonephonephonephone---12801280 x 844
1280ondesktop3x---phonephonephonephone-phonephone12803840 x 2532
1280oniPhone1x---phonephonephonephonephone--12801280 x 844
1280oniPhone3x---phonephonephonephonephonephonephone12803840 x 2532
390offdesktop1xphonephonephone-------390390 x 844
390offdesktop3xphonephonephone-----phonephone3901170 x 2532
390offiPhone1xphonephonephone----phone--390390 x 844
390offiPhone3xphonephonephone----phonephonephone3901170 x 2532
390ondesktop1x-phone-phonephonephonephone---980390 x 844
390ondesktop3x-phone-phonephonephonephone-phonephone9801170 x 2531
390oniPhone1x-phone-phonephonephonephonephone--980390 x 844
390oniPhone3x-phone-phonephonephonephonephonephonephone9801170 x 2531

Entry 9Reading the width in a script

Question
Is window.innerWidth the same as the CSS width?
Run
A 900 px wide element added to the page, window 390 px, with and without mobile mode.
Saw
With mobile mode off, innerWidth was 390. With mobile mode on it was 916, while the layout width stayed 390 and the CSS width query still matched. Without the viewport tag it was 980.
So
A script that tests innerWidth < 600 can disagree with the stylesheet in mobile mode: here it read 916 and called the window wide while the CSS called it narrow.

Presets and overrides

A device preset sets all four, and any option you send wins over it. These nine runs use viewport_device, on a page with a viewport tag. The iPad is not a phone by width and is one by user agent; the Galaxy Tab is the other way round.

Request optionsSay phoneDo notImageWhat it shows
viewport_device=iphone_15_pro10 of 10none1179 x 2556The preset alone.
viewport_device=pixel_810 of 10none1082 x 2402Density 2.625 picked the 3x file: the next size up.
viewport_device=ipad7 of 10max-width, device-width, picture1640 x 2360Width 820 passes none of the size tests. The iPad user agent still contains "Mobile".
viewport_device=galaxy_tab_s96 of 10max-width, device-width, picture, UA string1600 x 2560Its user agent has "Android" but not "Mobile", so a /Mobi/ sniff calls it a computer.
viewport_device=iphone_15_pro&viewport_mobile=false9 of 10hint1179 x 2556Touch stays on: a preset keeps its own touch setting. Only the client hint turns off.
viewport_device=iphone_15_pro&user_agent=<desktop Chrome>9 of 10UA string1179 x 2556Only the user agent test changes. The client hint still says mobile.
viewport_device=iphone_15_pro&viewport_width=12807 of 10max-width, device-width, picture3840 x 2556The three size tests turn off; everything else stays.
viewport_device=iphone_15_pro&device_scale_factor=18 of 102dppx, srcset393 x 852The two density tests turn off; the file is 393 px wide.
viewport_device=iphone_15_pro&viewport_landscape=true7 of 10max-width, device-width, picture2556 x 1179Turned on its side the window is 852 px wide, so the size tests turn off.

Which option to reach for

Pick by what the page checks, not by what a phone is. When you do not know, the preset sets everything the notebook moved.

You wantOptionWhy
The responsive layout of a phone-width pageviewport_widthWidth queries and picture sources follow the width and nothing else.
Taps, no hover, a coarse pointer, touch eventsviewport_mobileIt is the only setting that turns on touch, coarse pointer, hover: none and the mobile client hint.
The page a server sends to phonesuser_agentServer-side sniffing reads the string. Pair it with mobile mode if the page also looks at the client hint.
A sharper picture, the 2x or 3x imagedevice_scale_factorIt decides the srcset file and the picture size, and tells the page nothing about being a phone.
All of it at once, as one named deviceviewport_deviceA preset sets width, height, density, mobile mode, touch and user agent. Add one option of your own to override that part.
By preset: all four settings at once
curl "https://curlshot.com/api/v1/screenshot?access_key=YOUR_ACCESS_KEY&url=https://example.com&viewport_device=iphone_15_pro" \
  --output phone.png
Input only: a desktop-size window with touch, coarse pointer and the mobile hint
curl "https://curlshot.com/api/v1/screenshot?access_key=YOUR_ACCESS_KEY&url=https://example.com&viewport_width=1280&viewport_mobile=true" \
  --output desktop-size-touch.png

Presets and every option above are in Devices and Dark mode and emulation. Both the mobile screenshot tool and the tablet screenshot tool run a preset for you, and a successful render counts as one screenshot of the free plan whatever the device; see pricing.

How it was run

On 12 November 2026. The capture renderer of this product was started from the repository with a stand-in secret and pointed at a small server on this machine. A test page asked the browser ten questions about itself (the CSS media queries, the touch API, the client hint, the user agent string, which picture it chose) and the server logged the request headers. Every setting was rendered twice, in two passes; the two passes agreed in every one of the 49 settings.

Chromium 153.0.8010.12 through Playwright 1.63.0, on a Linux server that was busy with other work, so the page reports counts and pixel sizes and no timings. No call to the API was sent: the renderer process of CurlShot was started from its source and given each request directly. The test pages are mine and small. A real site asks other questions, and a real phone is not Chromium with these settings switched on: this shows what the settings do, not what every site does.

The window was 844 px tall in every run (the product default is 1024); the iPhone user agent is the string of the iphone_15_pro preset, and the lab check found it identical to the string the preset sends. Four extra runs of a 900 px wide element produced the numbers of entry 9.

Related reading

For the width and density of real devices, read the viewport sizes cheat sheet. For the reasons a capture differs from your own browser, read why website screenshots look wrong, and for the same idea with colour schemes, how to screenshot a website in dark mode.

Questions people ask

Does changing the user agent give me the mobile layout of a site?

Only if the site picks its layout on the server or in a script that reads the user agent string. CSS width queries do not read it. In the lab, an iPhone user agent on a 1280 px window changed 1 of 10 tests and left every width, touch and density test where it was. Add a phone width or a preset to get the layout of a responsive site.

Is a narrow window enough to screenshot the mobile version of a page?

For a responsive stylesheet, yes: a 390 px window flipped 3 size tests. A page that also checks touch, pointer or the client hint still sees a desktop. Use mobile mode or a preset (CurlShot option viewport_device) when the page cares about input.

Why does my mobile screenshot show a shrunken desktop page?

The page has no viewport meta tag. With mobile mode on, the browser lays such a page out 980 px wide and scales it to the window, so the image is phone-sized but the page is a small desktop page. With mobile mode off the same window lays out at its real width. This is how a phone treats that page too.

How do I turn touch on in a capture?

Set viewport_mobile=true, or use a device preset. There is no separate touch option: mobile mode turns touch on for a custom size, and a preset sets its own touch flag, which stayed on in the lab when mobile mode was switched off for the iphone_15_pro preset.

Why does my phone capture have more pixels than the window?

That is pixel density. A 393 px window at density 3 gives a 1179 px image of the same layout. Density does not change what the page thinks the device is; it only chooses the 2x or 3x pictures and sharpens the text.

Screenshot any page in one step

Paste an address into CurlShot and download the screenshot. A free account gives you 50 screenshots every month. No card needed.