You Don't Need Initial-Scale In Your HTML
36 points by MatheusRich
36 points by MatheusRich
The viewport metr is one of those terrible accidents of history we are stuck with. In a sane world, device-width would have been the default on the iPhone just as it had been on every device up to that point. Having the zoom function for sites that were fixed width is reasonable of course but we had been dealing with people having radically different screen sizes on the web for a decade by this point so throwing it all out was a bit of a bonkers choice.
Someone should tell Google to update their guidelines. (The feedback link on that page doesn’t work for me, and also doesn’t accept arbitrary text.)
I thought this was correct a few years ago, but someone corrected me:
If you have wide non-text content, for example an img, then the page will not necessarily appear at scale 1.
Demonstration:
https://temp.chrismorgan.info/2026-09-04-initial-scale-present.html
https://temp.chrismorgan.info/2026-09-04-initial-scale-absent.html
So since then I have gone back to including it.
The entire meta viewport thing is a total mess. Behaviour is underspecified and wildly underdocumented, and parsing defined in a very un-webby way. In fact, the atrocious incomplete spec of this stuff specifies using strtod to parse the number, which is locale dependent, so in theory on a locale that uses a different decimal separator (e.g. French), when someone writes initial-scale=1.0, the .0 will be ignored. (Never did figure out why anyone ever wrote the .0.) Anyone with such a locale want to test if initial-scale=1.5 works? I’ve been too lazy.
The article is not really clear about which browsers need it or not. I understand that it is not needed for modern browsers, but what about a browser from 5 years ago? It does not cost much to.keep it either.