
Vittorio Serra
I treat the browser as the least stable interface on the web, and the formats it exposes changed more in the last decade than in the decade before. It grew by accretion, so a client declaring one is announcing a set of features that were true when the string was written rather than now. The response to that has been a reduction scheme: a major version with a small list of actual differences. Client hints take the opposite approach, reporting the features that matter rather than a descriptive string, and the difference matters for anything parsing the old format. Bot detection rides on the same field and has the same problem. An honest crawler identifies itself and gets blocked by rules written for the dishonest ones, which is why a crawler that wants to be served has to be documented. Screen and viewport sizes are more stable but have two definitions. The screen size is the display, and the viewport is the area available to the page, which changes with browser chrome and on a phone it changes as bars hide and show. Code that measures the viewport has to handle it changing after load. Device pixel ratio is the other one. A screenshot taken at one ratio and compared against a layout built for another produces an image that looks wrong for reasons nobody can name. Every page states which value is being parsed and in which specification, because the answer changed more than once and most references predate the current one.
About ToolSura
ToolSura offers 80+ free, privacy-first online tools that run 100% in your browser — no uploads, no logins. Learn more about our mission →