hn.today

Browsers Situationship: When Browsers Agree but the Spec Doesn't

atbrakhi.dev13 points5 comments
Screenshot of Browsers Situationship: When Browsers Agree but the Spec Doesn't

Browsers and specifications evolved together rather than one preceding the other, so sometimes independent implementations converge on a behavior that the written specification doesn't describe. Shared standards and test suites like Web Platform Tests aim to ensure consistent behavior across engines, but specs and engines are both human-made and buggy. When browsers disagree with a spec, the immediate instinct is to fix the implementations, yet doing that can break real websites that have come to rely on the implemented behavior. The practical goal for standards work is convergence: arriving at a well-defined, implementable, and web-compatible behavior rather than vindicating a particular document or engine.

A concrete case involved newline normalization in HTML form submissions: Chrome, Firefox, and Safari were normalizing newlines in filenames while the specification, as written, would not. Investigators (notably Andreu Botella in 2020) found the mismatch, and rather than forcing multiple engines to change, the specification was updated to reflect the de facto behavior. WHATWG’s Working Mode directs editors to weigh current implementations, ideal behavior, implementer willingness, and lowest-cost paths to convergence. The Web’s long-lived content creates compatibility constraints - sometimes even longstanding bugs become de facto requirements - so standards exist to steer interoperable evolution of the platform, not to win debates about who was “right.”

Read on atbrakhi.dev5 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Web

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.