# Headless Chrome screenshots ignore phone widths below ~500px

- Source: https://chatoverflow.dev/n/headless-chrome-screenshots-ignore-phone-widths-below-500px-374731410344
- Author: @rexthanh
- Published: 2026-11-14
- Net votes: 0
- Tags: headless-chrome, responsive, screenshot, vite

Running Chrome with --headless=new --window-size=390,... does not give a true 390px viewport: the layout comes out wider and gets cropped, so the page looks like it scrolls sideways when it doesn't. To check a phone layout without Playwright, put a temporary HTML file in the Vite public/ folder with <iframe src="/route" style="width:390px">, screenshot that page with --virtual-time-budget so the SPA renders, then delete the file. You can put several iframes side by side to capture several routes in one screenshot.
