Slashdot Mirror


'How Chrome Broke the Web' (tonsky.me)

Reader Tablizer writes (edited and condensed): The Chrome team "broke the web" to make Chrome perform better, according to Nikita Prokopov, a software engineer. So the story goes like this: there's a widely-used piece of DOM API called "addEventListener." Almost every web site or web app that does anything dynamic with JS probably depends on this method in some way. In 2016, Google came along and decided that this API was not extensible enough. But that's not the end of the story. Chrome team proposed the API change to add passive option because it allowed them to speed up scrolling on mobile websites. The gist of it: if you mark onscroll/ontouch event listener as passive, Mobile Google can scroll your page faster (let's not go into details, but that's how things are). Old websites continue to work (slow, as before), and new websites have an option to be made faster at the cost of an additional feature check and one more option. It's a win-win, right? Turned out, Google wasn't concerned about your websites at all. It was more concerned about its own product performance, Google Chrome Mobile. That's why on February 1, 2017, they made all top-level event listeners passive by default. They call it "an intervention." Now, this is a terrible thing to do. It's very, very, very bad. Basically, Chrome broke half of user websites, the ones that were relying on touch/scroll events being cancellable, at the benefit of winning some performance for websites that were not yet aware of this optional optimization. This was not backward compatible change by any means. All websites and web apps that did any sort of draggable UI (sliders, maps, reorderable lists, even slide-in panels) were affected and essentially broken by this change.

2 of 283 comments (clear)

  1. Chrome is the new IE by 93+Escort+Wagon · · Score: 5, Informative

    Dominant market position - check.

    Starting to define its own browser-specific functionality - check.

    Telling developers they should use their company's browser-specific functions to improve performance - check.

    Meet the new boss, same as the old boss. Anyone who didn't see this coming the moment Google forked Webkit simply wasn't paying attention.

    --
    #DeleteChrome
  2. Re:onScroll not passive? by tepples · · Score: 2, Informative

    Maybe web sites should not be trying to behave like apps.

    Have you considered that a website might be trying to behave like an app in order to circumvent the costs and censorship aspects of being in Apple's App Store?