The usual way to check a new website for phones is on a computer: set the browser to phone width and look. We did that too. On a site we launched in November, that check said the page was fine. It wasn't.

What the computer showed

At 390 pixels wide, the width of a common iPhone, the page measured exactly 390 pixels. Nothing spilled off the edge. The menu opened, and the buttons sat where they should.

What the phone showed

Then we loaded the same page with real phone emulation, a test mode that behaves like a mobile browser, with touch input and a phone's screen settings. This time the page was 499 pixels wide on a 390 pixel screen, and the "Book now" button had slid over the menu button.

The difference is in how each one handles something that is too wide. A browser on a computer keeps the layout at the window's width and lets the extra stick out. A phone's browser widens the whole layout to fit the widest thing on the page, so everything moves, the header included.

One line of text did it

A single label on the page was set never to wrap onto a second line. It sat in a column that is allowed to grow but, by default, will not shrink below its longest unbreakable line. So the column grew to fit the label, and the page grew with the column. The fix was a one-line change to how that column is sized, applied across the whole site.

A second thing only a phone shows

The same site has a button that opens a chat on WhatsApp. Opening it in a new tab makes sense on a computer, where it becomes WhatsApp Web. On a phone, the link hands over to the WhatsApp app and the new tab stays behind, empty, so the visitor comes back to a blank page instead of the site. It now opens in the same tab on phones and tablets, and in a new tab on computers.

What we test now

Before a site goes live, we load it with phone emulation at several widths, in Chrome and in WebKit, the engine behind Safari on the iPhone. That site was checked at 12 widths, from 320 to 1440 pixels. Emulation is still not a physical phone, but it caught a problem the narrowed window missed.

A check you can do on your own site

Open your website on your phone and try to drag the page sideways. If it slides, or it loads slightly zoomed out with an empty strip down one side, something on it is wider than the screen. People seldom report a page like that. They go back to the search results and pick someone else.