Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
Chrome Google IT Technology

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

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.

'How Chrome Broke the Web'

Comments Filter:
  • Is this why the Slashdot dragbar for hiding comments below a certain upvote doesn't work on my phone or tablet?

    If so, get with the picture and fix it...Slashdot!

  • by Luthair ( 847766 ) on Wednesday November 08, 2017 @10:26AM (#55513379)
    Maybe you should fuck off with your website that modifies scrolling.
    • by tepples ( 727027 ) <tepples.gmail@com> on Wednesday November 08, 2017 @10:57AM (#55513593) Homepage Journal

      The featured article claims that "All websites and web apps that did any sort of draggable UI (sliders, maps, reorderable lists, even slide-in panels)". In such web applications, if the user is performing a slide gesture, he doesn't necessarily want to make the whole document scroll just because the gesture has approached the edge of the document.

      So let me get this straight: Are you claiming that such web applications "should fuck off"? Must they instead be rewritten as native executable applications that work only on one brand of operating system?

      • The featured article claims that "All websites and web apps that did any sort of draggable UI (sliders, maps, reorderable lists, even slide-in panels)". In such web applications, if the user is performing a slide gesture, he doesn't necessarily want to make the whole document scroll just because the gesture has approached the edge of the document.

        I can't read /. with my cell phone and Opera. The sliders don't work (message filter) and the threads are unreadable.
        Not to say I don't visit, I just stick with the summaries and links from them.

      • by AmiMoJo ( 196126 )

        Maybe web sites should not be trying to behave like apps. Especially if doing so kills browser performance and battery life on mobile.

        Can you give an example of a web site where this behaviour is actually desirable?

        • Re: (Score:3, Informative)

          by tepples ( 727027 )

          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?

          • by AmiMoJo ( 196126 )

            Missing the point, I don't want apps wasting my battery on pointless crap either. A nice, usability focused UI will be fine, thanks.

            I guess maybe there are some unusual applications that would benefit from your use case, but I really can't think of any app that was censored/driven out by price and would benefit from having that kind of interactivity via a web version.

            • by tepples ( 727027 )

              A nice, usability focused UI will be fine, thanks.

              What "nice, usability focused UI" do you recommend for reordering the relative position of items in an outline, or chat rooms in a server, or priorities in a to-do list, without slide gestures?

            • What's more usable:
              - A UI where, in order to move items in a list, you must click an up/down arrow and wait for the page to reload with the moved item in its new position
              or
              - A UI that lets you reorder a list by dragging the items where you want them?

              Unlike most people (I've done market research on this very topic), you must not think the second option is more usable, because that's what Google broke.
            • Missing the point, I don't want apps wasting my battery on pointless crap either. A nice, usability focused UI will be fine, thanks.

              Lynx.

  • by Bohnanza ( 523456 ) on Wednesday November 08, 2017 @10:28AM (#55513387)
    "Now, this is a terrible thing to do. It's very, very, very bad, believe me, folks"
    • by Tablizer ( 95088 )

      Do you mean the summary, or actual article? The summary I submitted in the story submission form was different from the Slashdot-published version. As the first line points out, it has been edited. Actually, my summary was shorter than the published version. For one, it didn't include the "very, very, very bad" line because I felt other wording already indicated Google's change made a bigly mess.

      - Tablizer

  • by Anonymous Coward on Wednesday November 08, 2017 @10:29AM (#55513393)

    The mantra of the Chrome team was once "Don't break the web".

    This hasn't been true for some time now. Why? Because power.

    Take (for example) Google's newfound habit of "updating" their webfonts. How many layouts have they broken in the process? Millions.

    Google needs to rediscover the value of accepted standards. But there seems to be a new management team calling the shots.

    And they're mostly d*cks.

    • The mantra of the Chrome team was once "Don't break the web".

      Their parent's mantra used to be "Don't be evil".

      Can you see a pattern beginning to emerge here?

    • Take (for example) Google's newfound habit of "updating" their webfonts. How many layouts have they broken in the process? Millions.

      If your website breaks because the font changes then it's not Google who deserves to be tared and feathered, but the web designer.

      • Take (for example) Google's newfound habit of "updating" their webfonts. How many layouts have they broken in the process? Millions.

        If your website breaks because the font changes then it's not Google who deserves to be tared and feathered, but the web designer.

        If you change a font used by a bunch of people without telling them and giving them an option to use the current version, you deserve to be tarred and feathered.

        Why the FUCK would you pull the rug out from under someone like that?

        • Changing a font on a user without notice is bad. Changing a font on a website without notice to the website owner shouldn't make a difference. If it does make a difference, you're a bad, bad website designer.

          • Uh, that changes the font to the end user, so it's thus bad. Further, of course it makes difference! If there's no visual difference to the changed font, there's no point in changing the font!

    • by alexo ( 9335 )

      Google needs to rediscover the value of accepted standards. But there seems to be a new management team calling the shots.

      “It is difficult to get a man to understand something, when his salary depends on his not understanding it.”
      -- Upton Sinclair

  • by Anonymous Coward

    if you use Chrome.

    As I'm firmly in the 'fuck Google and all of their products' camp, I hadn't noticed.

    • Came here to say this. If Chrome is ever the only browser available, I'll simply do without the Web. Not only do I despise Google's antics, I'm one of the (apparently) small minority that thinks their browser utterly sucks and always has.

    • I use Chrome, but not on mobile. Haven't noticed anything wrong in with sites, including mine that rely on dragging. I'm guessing this is very limited to Chrome Mobile, which means Android, a fraction of web sites broken for a smaller fraction of web users
      • Indeed, this likely affects one of my clients' sites but, as they develop Mac, iOS, and Windows software, they don't care enough to even approve testing in Chrome on Android, let alone any fixes. And, so, it shall remain broken until they do. Which they won't.

        This is going to hurt Chrome more than anything.
  • by myowntrueself ( 607117 ) on Wednesday November 08, 2017 @10:35AM (#55513431)

    It doesn't sound like they broke the web; surely other browsers carried on working just fine? They broke their own product.

    • by TuringTest ( 533084 ) on Wednesday November 08, 2017 @10:43AM (#55513509) Journal

      Except that users will perceive it as "this old website doesn't work", not "Chrome doesn't work", since the problems only happens in some websites and not others.

      • Since the fix is to update the website, couldn't you just update it to say "Your web browser is not standards compliant". The same amount of effort and places blame in the appropriate place.
  • Isn't it funny how the bigger companies seem to just "know better" than the rest of the Internet engineers?
    • Isn't it funny how the bigger companies seem to just "know better" than the rest of the Internet engineers?

      It would perhaps be better if you internalize the fact that the criticism of having "broke the web" is a one person opinion.

      Others would probably disagree.

  • Chrome is the new IE (Score:5, Informative)

    by 93 Escort Wagon ( 326346 ) on Wednesday November 08, 2017 @10:49AM (#55513549)

    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.

    • Totally sucks to the point of being unusable, and can't even do something as simple as sizing a box correctly, and can't even show a PNG with transparency ten fucking years after the standard: not-checked.

      Anyone who thinks Chrome is the new MSIE, totally doesn't remember how outrageously bad MSIE was. I understand if you blotted it out of your memory; that isn't your fault. But don't pretend things now are nearly as bad as they were back then.

      Chrome does seem to be trying to do some kind of embrace-and-ex

    • Meet the new boss, same as the old boss.

      But.. but... the old boss was evil. New boss is not evil. He said so himself. That is his motto. Don't be evil.

    • 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.

      One of my favorites is Google defining their own transport protocol and granting themselves full control over congestion algorithms.

      • Not even original - Microsoft did this for IE talking to IIS. I don't remember the exact details, but they were skipping part of the standard TCP handshake to reduce latency, so pages loaded faster with IE, but only if served from a Windows IIS machine.
    • 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.

      YEAHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH!!!!!!!!!!!!!!

  • The web isn't a development platform, it's a more advanced version of Hypercard. It sucks, it changes to account for the constant sucking, and web "developers" want to make something amazing and be done with it, but you can't make something amazing in Hypercard 2.0, you can just make some presentation. The web isn't designed as an application layer, it's designed as a presentation layer. Stop making apps in the web, they are slower and generally garbage.
    • by Tablizer ( 95088 )

      We need a new HTTP-friendly GUI standard. The HTML/DOM/JS stack sucks for modern needs. My suggestion is to move more of the computations, including the layout engine, to the server-side to reduce browser-version-dependency: slimmer client where the browser becomes mostly a dumb vector plotter.

      You start by thinking, "what do we absolutely HAVE to do on the client" to be practical. If functionality can be moved to the server, then don't include it in the client (UI standard).

      The X-Window system seems about t

      • by PCM2 ( 4486 )

        Teradici PCoIP seems like the kind of thing you're looking for, but it's not really practical for a lot of casual applications because of bandwidth requirements. You've gotta remember that most people today are surfing the web on their phones; maybe not all the time, but they're doing it at least some of the time. If your alternative to client-side processing is unusable on a shitty 3G connection, it's a non-starter.

  • This whole thing sounds like it was written by a gisgruntled ex-employee.

  • - I have been using 3/4 different browsers on a daily basis since quite long time ago. I use each of them to visit different sites where I store my credentials/not. Usually, I rely on the most updated versions and, until some months ago, I rarely had problems to access relevant enough sites with any of them. But lately, I am having lots of troubles in quite a few sites every time I use any browser different than Chrome. The problems are mostly related to videos, mainly streaming them (from relatively big TV
    • Clarification about the upper buttons: I meant when the browser isn't fully maximised; also you can modify that behaviour [askubuntu.com]. My question is about why being that the default setup, is that comfortable for a Linux user? For me, it isn't.
    • by green1 ( 322787 )

      Have people completely forgotten about cross-compatibility or what? Now!! When all the browsers behave almost identically!

      I want to know when you thought we ever had cross-compatibility? The only thing that's changed is which browser the web is built for. It used to be that sites only worked properly in Netscape, all other browsers be damned. Then it switched to IE and forget about using any other browser, and now you'd better use Chrome if you want the web to work. There's never really been a time since the dawn of the graphical browser where you could realistically expect the majority of the internet to "just work" on any br

      • There's never really been a time since the dawn of the graphical browser where you could realistically expect the majority of the internet to "just work" on any browser you chose to use.

        You might be right by considering a big enough random sample of websites, but from my personal experience things are getting notably worse now. I have never had relevant problems to visit important sites with properly-updated browsers until relatively recently. I am talking about national TVs or newspapers, worldwide-known sites like Youtube or Twitter and so on. And I am not referring to looking-a-bit-bad versions either, but to fully non-functional or, at least, notably slower/buggier major functionalitie

        • by green1 ( 322787 )

          I feel like you didn't live through the IE vs Netscape era...

          • I feel like you didn't live through the IE vs Netscape era...

            Although I didn't really care too much about computers/internet/programming until relatively recently (a bit over the last 10 years), I did live that era and don't think that it had anything to do with nowadays/what is being discussed here. Back then, finding errors or waiting a lot for a page to load was pretty usual, to not mention the fact that most of the pages were static and internet was still too secondary. Additionally, there is no need to go back so many years, I am talking about comparing my perso

  • by 140Mandak262Jamuna ( 970587 ) on Wednesday November 08, 2017 @11:32AM (#55513851) Journal
    The summary says:

    It's very, very, very bad

    It explains:

    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

    OK, half the user websites? 50% of the web right? The linked article says:

    We looked at the percentage of cancelable touch events that were sent to a root target (window, document, or body) and determined that about 80% of these listeners are conceptually passive but were not registered as such. Given the scale of this problem we noticed a great opportunity to improve scrolling without any developer action by making these events automatically "passive".

    Looks like the chrome team did some basic profiling, figured out 80% of the listeners are actually passive. Still they should not have touched the default and educated the website developers to register conceptually passive listeners as passive, right?

    Google gives some motivation for this:

    We believe the web should be fast by default without developers needing to understand arcane details of browser behavior.

    There are some plots and more profiling data there.

    They could have done an RFC and got the standards updated in the next batch for this. But still, as evil behaviors go, this is not "dos is not done till lotus wont run" level. Does not even come to working around bugs in IIS in IE to make all other browsers crap out level of evil.

    • by LordKronos ( 470910 ) on Wednesday November 08, 2017 @12:27PM (#55514231)

      Yeah, I'm finding it a little difficult to get worked up about this. It's been this way for over half a year and I haven't noticed anything broken by it. And honestly I'm having a bit of difficulty imagining how a website could legitimately use this sort of eventListener and not be a prime example of sloppy coding. Yes it might've worked by the standard...I understand that. But really...listening for scroll events at the window, document, or body level? Can someone give me a good example of how this is used and couldn't be done better? Some of the "broken things" examples given in the linked article: Drag an drop list? Your list should be contained in some div or ul element and you should apply the listener at that wrapper level, not listen to ALL scroll events on the ENTIRE document. Sliders? Same. Maps? Same. Yes, it might have worked before by listening to all body events, but really that's just shit design.

      So I feel like a better description would be more like "google broke 50% of the shitty websites, but not the well designed ones". But please, I welcome an example to show me where there are good reasons to do this.

      • It's been this way for over half a year and I haven't noticed anything broken by it. And honestly I'm having a bit of difficulty imagining how a website could legitimately use this sort of eventListener and not be a prime example of sloppy coding.

        This should be the free square on this-is-why-developers-don't-write-requirements Bingo. Just because you don't use this style of interaction, nobody should need it.

        How about these two use cases:

        * Reordering elements in a list
        * Maps

        I use these all the time. It's entirely possible this change is why a few sites have become unusable on my phone and - like people have been pointing out - I've assumed it's because those sites weren't mobile compatible. Maybe the sites are mobile compatible, but not in Chrome. G

        • by LordKronos ( 470910 ) on Wednesday November 08, 2017 @05:46PM (#55516127)

          Or perhaps this should be the free square on why you read the post before replying to it. Read my post again. As I mentioned, this particular chrome change ONLY applies for event listeners that are bound to the window, document, or body. It's a pretty general rule that any type of listener should be scoped to only listen to the minimum required amount of events. When you bind to window, document, or body, you are pretty much saying GIVE ME EVERYTHING. So now you get called for every event...even those you couldn't possibly be the slightest bit interested in. Best programming practice is generally to scope your event listeners so that they only get called in cases where you might possibly be interested in handling them.

          Lets look at a simple case....a webpage where the body contains 2 divs (divA and divB). In divA, you want to handle an event and perform some custom handling, possibly even cancel the the event with preventDefault. In divB, you never care about the event, so your event handler is always going to do nothing.

          If you bind your event handler to divA, then whenever that event occurs in divB your event handler will never even be call. That's perfect...you aren't interested so lets not even waste time asking if you want to do anything. But if you bind your event handler to the body/document/window, your event handler is going to be needlessly called so that it can do ABSOLUTELY NOTHING (except waste CPU time) every time the event occurs in divB.

          So that was my point...based on what I've read my gut instinct is to say that this would pretty much only affect web pages where the programmer was too sloppy/lazy to properly scope their event handler to the parts of the DOM where they're actually interested in doing something about that event.

          But of course, I admit that I may certainly be overlooking cases where this isn't the case, and there's absolutely no way to implement it without throwing an event handler on the window/document/body. And that is why I humbly asked for examples where I was wrong and this is the only way to do it. I will note that you provided precisely zero example of such. Maps and reorderable lists can certainly have their event handlers properly scoped instead of just throwing them on the window/document/body

    • We looked at the percentage of cancelable touch events that were sent to a root target (window, document, or body) and determined that about 80% of these listeners are conceptually passive but were not registered as such. Given the scale of this problem we noticed a great opportunity to improve scrolling without any developer action by making these events automatically "passive".

      What usually happens "We" is one person or small group with both power and a very particular interest. Then shockingly it turns out data collection and analysis reflects this same narrow view.

      In the absence of "We" bothering to expend effort on a credible survey or offering up externally reviewable supporting evidence such proclamations in my view are best ignored in their entirety.

  • by RogueWarrior65 ( 678876 ) on Wednesday November 08, 2017 @11:37AM (#55513885)

    Can someone explain why I have to restart Firefox at least once a day in order to play back video of any kind?
    And why doesn't Wunderground render properly on Firefox? It seems that everything is a lot slower these days further convincing me that trying to do anything online that used to be done with a dedicated program is a bad idea.

    • The Russian and American malware you've contracted are incompatible. So are the others, but not such you'd notice.
    • Firefox sucks. Use Pale Moon [palemoon.org].

      Although everything gets slower and slower as they cram more and more into websites. Gotta have ads, and flying banners, and things minimizing, and embedded video auto-starting, and all that shit. For some reason.

      • I think there is a lack of optimization going on. Websites are now downloading more and more code to make them interactive and it's either not getting cached or it changes so often that caching it is pointless. That's a pretty dangerous precedent because it means more bandwidth is getting wasted.

    • At this point I can count on Wunderground to be broken more than 50% of the time. Differently on different days, at different times of day, and on different clients, but broken most of the time. (Trying to change a display preference? Scroll through times in the 10-day forecast view? Select conditions from a controlled (airport) station instead of a random PWS sitting in someone's backyard next to their dryer vent? "We'll be rolling out an update in a couple of months.")

      But not to worry. They're maintaining

  • I've noticed with Chrome for quite a while now that the slashboxes on the right don't scroll with the rest of the page, making them useless. Is this related to the change described in the article, or is this something different?

  • It sounds more like they broke chrome.

  • by Trax3001BBS ( 2368736 ) on Wednesday November 08, 2017 @11:47AM (#55513957) Homepage Journal

    I came from Dos/Amiga to Windows, the very first time I used Internet Explorer I didn't want any part of it.
    Not used to WWW I went to Microsoft.com found a game that looked decent and downloaded it (I thought). ActiveX kicked in and was installing something I hadn't looked at first, so pulled the computer power cord.

    The second time I used IE was to download Netscape.

  • Multiple browsers (Score:5, Insightful)

    by ilsaloving ( 1534307 ) on Wednesday November 08, 2017 @12:14PM (#55514151)

    It's idiocy like this why I am compelled to have at least 3 different browsers on every machine I use. Because it seems like every time there's some kind of update, stuff get horribly broken and I need to switch to a different browser for an extended period of time. It's to the point where I've purchased an xmarks premium subscription, so that all my bookmarks gets synced and I don't have to jump through hoops when the inevitable switch happens.

    It's so frustrating the way companies think that they are allowed to have defacto control of the entire internet.

    Fuck you Google, and fuck you Microsoft before you.

  • by hughbar ( 579555 ) on Wednesday November 08, 2017 @12:56PM (#55514465) Homepage
    Well, they had good teachers, when they were younger.
  • by pgn674 ( 995941 ) on Wednesday November 08, 2017 @01:40PM (#55514749) Homepage
    Is that why the map on this website doesn't pan reliably on Google Chrome mobile? 7-Day Forecast for Latitude 43.66ÂN and Longitude 70.27ÂW (Elev. 7 ft) [weather.gov] I just tried Mozilla Firefox mobile. Works much better in that app.
  • If they really cared then they would fix the Chrome bug on Android, related to soft keyboards. Essentially the keyboardEvent.key is broken there and they donâ(TM)t care to fix it. Only platform where this does not work. >:(

Work is the crab grass in the lawn of life. -- Schulz

Working...