Slashdot Mirror


Google Working on Blocking Back Button Hijacking in Chrome (zdnet.com)

Google engineers are currently working on a Chrome browser update that will block malicious websites from hijacking the browser's history and, indirectly, the Back button. From a report: The issue at hand is a well-known tactic often seen employed by many shady sites across the Internet. A user would visit a website, then he'd accidentally click or tap on an ad, and be taken to a new page. But when the user presses the Back button to go back to the previous page, the browser just reloads the same page over and over again, keeping the user trapped on the ad page. [...] Recent source code updates to the Chromium project, the open-source browser engine behind the Chrome browser, reveal that Google engineers are planning to crack down on this type of abusive behavior. These code updates will allow Chrome to detect when browser history entries have been generated by user interaction, or by an automated method.

60 of 152 comments (clear)

  1. Thank God by Anonymous Coward · · Score: 1

    But I'm sure there will be some of this
    https://xkcd.com/1172/

  2. Easy by Anonymous Coward · · Score: 1, Informative

    Store date and url.
    Remove all urls displayed less than 3s.

    1. Re: Easy by c6gunner · · Score: 1

      The mobile chrome browser does not have a back button. You can use the back button at the bottom of the screen, but holding that one either does nothing, or (on some roms) it kills the current foreground app.

  3. Not sure whether the feature is entirely new by RuiFRibeiro · · Score: 1

    I suspect the notice fails to mention this feature is not entirely new.
    I remember that in a few shadier sites I used in the past for watching movies, the redirects did not go into the history, I had to monitor DNS when I was trying to blacklisting them, however they changed them every day, and then I resorted to whitelisting.
    Maybe some shadier sites found out strategies to get around it, but then the newspiece is not entirely clear on that feature not being entirely new.

    1. Re:Not sure whether the feature is entirely new by PPH · · Score: 1

      Shady sites get opened in their own tab. Or window. And then get closed when I'm tired of fighting with them.

      --
      Have gnu, will travel.
  4. Re:A UX which deliberately overrides user's wishes by Ksevio · · Score: 1

    WTF are you talking about? It sounds like Google is solving a problem with navigation that a lot of sites are creating. Even facebook has the problem that when you click "back" you don't go back to the previous page you were on, you stay on facebook.

  5. the error of our ways: by Gravis+Zero · · Score: 1

    The embrace of "use javascript to do whatever the fuck you want" has really come back to bite users. It makes people money, so it's not going anywhere until someone gets fed up with all the cat and mouse games and makes a legit system that doesn't rely on it.

    --
    Anons need not reply. Questions end with a question mark.
    1. Re:the error of our ways: by Merk42 · · Score: 1

      The embrace of "use javascript to do whatever the fuck you want" has really come back to bite users. It makes people money, so it's not going anywhere until someone gets fed up with all the cat and mouse games and makes a legit system that doesn't rely on it.

      Which would either be:

      Full page refreshes for every action:
      Sites are free to do this now (even you or any of the armchair developers in here could build a site doing this!), but they probably wouldn't because users are used to instant response in their actions

      Use some other language:
      Which would then evolve to be able to do the same things as JavaScript anyway.

    2. Re:the error of our ways: by kurkosdr · · Score: 1

      Exactly. I hate JavaScript. Everyone disliked Flash but Javascript is much worse because it spreads all over the page DOM. At least Flash was confined to a single DOM node (aka a single box in the page). The only benefit of Javascript is the client implementations are better, but the concept is much worse. Even if browsers prevent back-button hijacking, there is still the problem of pop-ups having come back in force by using javascript overlays. And pages that load ads dynamically when you just want to read the text.

    3. Re:the error of our ways: by lgw · · Score: 2

      I'm perfectly happy with web sites that do nothing until I click on a link. Everything I've seen that relies on JS tricks is just bad UX and we're better off without it. From the evidence before me, JS is used entirely to make the UX suck.

      But, still, the average Web UX is vastly better than the average mobile app UX, so it's go that going for it. Sadly, mobile app UX brain damage is starting to leak into web design, so all hope will eventually be lost.

      --
      Socialism: a lie told by totalitarians and believed by fools.
    4. Re:the error of our ways: by Gravis+Zero · · Score: 1

      Which would either be:
        Full page refreshes for every action:
      Use some other language:

      Only two options and nothing else? hmm...

      --
      Anons need not reply. Questions end with a question mark.
    5. Re:the error of our ways: by Merk42 · · Score: 1

      First off, it's not a dichotomy since there is the 3rd option of Status Quo. Second, if you can provide a third (fourth?) situation, I'm all ears.

    6. Re:the error of our ways: by Kyr+Arvin · · Score: 1

      I'm perfectly happy with web sites that do nothing until I click on a link. Everything I've seen that relies on JS tricks is just bad UX and we're better off without it. From the evidence before me, JS is used entirely to make the UX suck.

      But, still, the average Web UX is vastly better than the average mobile app UX, so it's go that going for it. Sadly, mobile app UX brain damage is starting to leak into web design, so all hope will eventually be lost.

      Meh, I don't have a problem with, say, Slashdot's UX, where comments aren't loaded until you click on them (except for the first few lines, and any comments that meet the threshold for inlining). That sort of JS UX is fine with me.

    7. Re:the error of our ways: by Gravis+Zero · · Score: 1

      There are so many options.

      * expand HTML/CSS so that javascript isn't needed
      ** "onVisible" which loads contents into a div from a provided URL
      ** expand CSS to have (non-chainable) animation events that can be activated by "onClick"/"onHover"/etc...

      * restrict javascript's communication/loading/computational capability
      ** only allow a single domain to load javascript from
      ** limit javascript to being able to interact a specified (in the html document) list of domains
      ** remove lots of the "features" that enable bullshit like this
      ** make javascript computation a resource which will halt after so instructions are executed

      Sure, your web apps will need special whitelisting to work but nobody gives a shit.

      --
      Anons need not reply. Questions end with a question mark.
    8. Re:the error of our ways: by Merk42 · · Score: 1

      * expand HTML/CSS so that javascript isn't needed ** "onVisible" which loads contents into a div from a provided URL ** expand CSS to have (non-chainable) animation events that can be activated by "onClick"/"onHover"/etc...

      Not sure how much of that belongs in CSS, though that's really semantics. Even still, it falls under "use a different language that would evolve to do the same stuff anyway."

      restrict javascript's communication/loading/computational capability ** only allow a single domain to load javascript from ** limit javascript to being able to interact a specified (in the html document) list of domains ** remove lots of the "features" that enable bullshit like this ** make javascript computation a resource which will halt after so instructions are executed

      Sure, your web apps will need special whitelisting to work but nobody gives a shit.

      Okay so something that is restricted in functionality by design? Sounds great

    9. Re:the error of our ways: by lgw · · Score: 1

      I hate it. Thankfully, there's still the classic UI.

      --
      Socialism: a lie told by totalitarians and believed by fools.
    10. Re:the error of our ways: by Gravis+Zero · · Score: 1

      Not sure how much of that belongs in CSS, though that's really semantics. Even still, it falls under "use a different language that would evolve to do the same stuff anyway."

      Incorrect. The purpose is that it would be limited to user interaction based animations, incapable of chaining events and thus no longer be Turing complete. Turing completeness is really what's enabling bad behavior. Remove the capability and remove the threat.

      Okay so something that is restricted in functionality by design? Sounds great

      AMP modifies pages and there is no mandate compliance. The idea is to stop bad behavior rather than just avoid it's consequences.

      --
      Anons need not reply. Questions end with a question mark.
    11. Re:the error of our ways: by Merk42 · · Score: 1

      Right, you just want reduced functionality and think that users as a whole would be fine with that.

    12. Re:the error of our ways: by Gravis+Zero · · Score: 1

      Not at all. I'm sure plenty of idiots will bemoan the loss of javascript games. Likewise people who build their business models on selling information will be upset.

      The truth is that scripting isn't needed for building web pages but it sure is profitable.

      --
      Anons need not reply. Questions end with a question mark.
    13. Re:the error of our ways: by Merk42 · · Score: 1

      Ah yes, literally the only two purposes for JavaScript are games or harvesting information.

      Now who's using a dichotomy?

  6. What I do by Locke2005 · · Score: 1

    Teach your idiot friends and family how to use Task Manager to kill the Chrome process, instead of calling the "Microsoft Support" number and giving them your credit card number!

    --
    I've abandoned my search for truth; now I'm just looking for some useful delusions.
    1. Re:What I do by samwichse · · Score: 1

      That's great... except of course you've now closed the page (that had the ad you accidentally clicked) you were trying to view, as well. So now you have to re-navigate to it.

      Google's seems like a perfectly fine solution to an irritating problem that bites me occasionally.

  7. Curious how they tell legitimate from illegitimate by Oswald+McWeany · · Score: 2

    I'm curious if they are going to discriminate between legitimate and illegitimate forms of updating the browse history. On some of my single-page apps I change where the back-button takes them. Not to trap them, but to provide functionality. I wonder if this is going to be blocked for everyone, or just the people who set up an infinite loop of back buttons leading to the same page.

    --
    "That's the way to do it" - Punch
  8. Re:Curious how they tell legitimate from illegitim by Anonymous Coward · · Score: 1

    On some of my single-page apps I change where the back-button takes them.

    Since the first time I loaded up Mosaic, I have expected the back button to take me back. Not sideways.

  9. Re:I don't like to do it. by DontBeAMoran · · Score: 1

    Website = One platform. All users are always up-to-date.

    Application = A minimum of five platforms: Windows, Mac, Linux, iOS, Android. All users need to update the application themselves.

    Guess which one is cheaper to develop for? And before you say "cross-platform compiler", remember that these make crap UIs for each platform.

    --
    #DeleteFacebook
  10. Re: Curious how they tell legitimate from illegiti by reanjr · · Score: 1

    Most likely, they will track the source of the history update and ignore it if isn't a click. Additionally, they will likely squash multiple history updates from a single click into one.

  11. Re: Curious how they tell legitimate from illegiti by reanjr · · Score: 3, Interesting

    That's fine when every click loads a new page, but If a click simply loads new content into the same page, it makes sense to tweak the history in those cases to make the back button work as expected.

  12. It's not just shady web sites by biggaijin · · Score: 3, Interesting

    I have encountered several fairly well-known news sites that fool with the back button, making it difficult to back up past their home page.

    Even more than this, I would love to see the browser people find a way to absolutely, positively block auto-play videos. The one at the top of a news story is irritating, but when you scroll past it and a little clone of the window pops up in the right margin and starts playing it really gets on my nerves.

    1. Re:It's not just shady web sites by IWantMoreSpamPlease · · Score: 2

      Under Chrome/Centbrowser there is an extension called "AutoplayStopper" I have tested out and it works 100% of the time. Also "flash control" to catch flash stuff.

      --
      So rise up, all ye lost ones, as one, we'll claw the clouds.
  13. Re:Curious how they tell legitimate from illegitim by DontBeAMoran · · Score: 2

    If you came from a different domain name, then the back button has probably been hijacked.
    Also, all they have to do is add a property to the history log: user click vs script modification.

    --
    #DeleteFacebook
  14. Re:I don't like to do it. by DontBeAMoran · · Score: 1

    You're the one who visited the application website.

    --
    #DeleteFacebook
  15. Re: I don't like to do it. by Lije+Baley · · Score: 1

    And the websites don't have a crappy UI?

    --
    Strange things are afoot at the Circle-K.
  16. Re:Curious how they tell legitimate from illegitim by Oswald+McWeany · · Score: 2, Interesting

    Since the first time I loaded up Mosaic, I have expected the back button to take me back. Not sideways.

    If you're using AJAX within a webpage though, sometimes you expect the back button to take you to what you were previously viewing NOT make you leave the site altogether. If a single page is dynamically updating content based upon what you click on, you probably want script manipulation of the back button.

    Example, I have a table of widgets- I click on a widget and it loads details (you haven't changed website or been forwarded to a new address)... if you click the back button you probably want it to return you to the table; not have it exit the webpage completely. There are times you don't want the back button to actually take you back to the real actual previous webpage.

    --
    "That's the way to do it" - Punch
  17. Re:Curious how they tell legitimate from illegitim by Dan+East · · Score: 2, Insightful

    They usually flood the navigation history with many bogus entries, so you'd have to click Back a hundred times to actually go back. That would be easy to detect.
    If they are more intelligent and just use a single bogus history entry, and when it is navigated to always create another, well that is easy to detect too.

    Another way to solve this is to only allow as many navigation history events to be added as there are user interactions. So if the user doesn't interact at all, no navigation history events can be added, thus hitting the back button gets you straight out of there.

    I can't think of any legitimate reasons to be adding anything to the back history as soon as you visit a web page.

    --
    Better known as 318230.
  18. Slowly we are catching up to the year 2013 by Kohlrabi82 · · Score: 2

    Presto Opera (e.g. =12.x) had this feature years ago. Glad that we are slowly catching up to Opera's feature set...

    1. Re:Slowly we are catching up to the year 2013 by cascadingstylesheet · · Score: 1

      Presto Opera (e.g. =12.x) had this feature years ago. Glad that we are slowly catching up to Opera's feature set...

      Opera seriously was the best browser ever.

      It was a crying shame when they decided to become a Chrome skin.

    2. Re:Slowly we are catching up to the year 2013 by toddestan · · Score: 1

      I started using Opera after giving up on Netscape 4.0 and stuck with Opera 12 until sometime in 2015 when sadly it became pretty obvious that Presto-based Opera was past it's sell-by date and was truly dead. Actually one of the pain points with Opera 12 towards the end was just how bad slashcode starting making the browser choke.

      Not liking Chrome and not particularly excited with Firefox I started looking for alternatives. I initially dismissed the Chromium-based Opera, but after doing some research it seemed to actually be the best of the Chromium-based browsers, though now that it's owned by the Chinese I'm not so sure about that anymore. I never actually really used it much though, instead moving to Palemoon and Waterfox.

  19. Re:Curious how they tell legitimate from illegitim by MobyDisk · · Score: 4, Interesting

    This isn't talkong about an Angular app with routing that uses back properly. It is talking about automatic redirects like HTTP 301 or meta refresh tags. For those the sokution is easy, Firefox has done this for years. If you hit back, and the page then auto-redirects you immediately, ignore the redirect. The user then just has to hit back a few times, but at least they aren't stuck. Even better would be if hitting back went back to the most recent page that did not have an automatic redirect in it.

  20. Re: Curious how they tell legitimate from illegiti by TFlan91 · · Score: 1

    ^ This.

    If all I need to do is send a XHR request for a few to hundreds of KB to render what is required, why reload the page and all the dependencies and images (let's ignore caching for argument sake). Sure, the front-load of a few MB for the whole application is a few seconds, but the rest of your experience is immediate and responsive.

    Don't you wait for Photoshop, Word, Outlook, whatever-game-you-play etc to finish loading before you start using it?

    This idea works well for pages where I will be visiting for hours on end, Inbox (stb gmail...), work websites, music, calendars, forums, whatever. The catch being the developers need to know how garbage collection works.

    And then in that case, you take control of the back button so it doesn't break the experience.

  21. Re:Curious how they tell legitimate from illegitim by Sumus+Semper+Una · · Score: 2, Insightful

    I can see what you're getting at. In some cases, when a user navigates through a web page that is built and displayed dynamically through javascript without reloading its parent page, a user might expect that hitting "back" would take them to the previous frame of whatever content they last navigated through. They could become annoyed when "back" actually takes them wherever they were before arriving at the site initially and losing all their progress.

    But I don't agree that selectively modifying "back" button functionality is a good solution to the problem. Either browsers should agree that "back" means go back to the previously viewed content and allow pages to easily add actions taken on the page to the browser history or "back" should mean "always load the last parent page I went to." Right now it means the latter. I wouldn't be opposed to the former, but until that becomes a standard I feel the onus is on the developer to expect the "back" button to always have the same effect and not try to modify around it.

    I also understand that the browser allows you to modify how things like the back button work. I just personally wouldn't build important functionality in my site around something the browser normally controls, and wouldn't be terribly surprised if it stopped working the way I'd originally intended after a browser update.

  22. Re:I don't like to do it. by Hentes · · Score: 1

    But isn't the back button breaking web apps a good argument to allow it to go back to the previous page? Then your web app wouldn't have to worry about it.

  23. Advertisers would use force by WCMI92 · · Score: 1

    If they could get away with it. They'd make you listen to their "copy" and buy whatever it is they are selling. And they'd have no moral objection to it.

    --
    Corporatism != Free Market
  24. No more Free iPads and Walmart gift cards?!?! by ripvlan · · Score: 1

    Users accidentally tap/click an ad? Sorry to report but some ads hijack the website and auto-redirect to these scam ads. Then I'm stuck with a popup "you've won a free XYZ" and the back-button doesn't work. And the only way out is to close the tab.

    1. Re:No more Free iPads and Walmart gift cards?!?! by hwolfe · · Score: 1

      Accidentally? There are sites that do the redirect without having to click on anything.

  25. Re: I don't like to do it. by TuballoyThunder · · Score: 2

    I can appreciate the logic if you developing an web-based application like Gmail. An advertisement hijacking the webpage is not an application, it's scammy and evil. I don't know what is worse scammy hijack advertisers or sites that allow them and offer a paid ad-free subscription. I have nothing against paid subscriptions (I even have some), but making your ad-supported version user hostile is also evil.

  26. Re:Curious how they tell legitimate from illegitim by Oswald+McWeany · · Score: 3, Interesting

    I also understand that the browser allows you to modify how things like the back button work. I just personally wouldn't build important functionality in my site around something the browser normally controls, and wouldn't be terribly surprised if it stopped working the way I'd originally intended after a browser update.

    Well, the answer is you don't build important functionality into the back-button, you give other options and try to get the user to use those other options for navigating; HOWEVER, you can't control a user and can't prevent them clicking the back-button if they really want to (all you can do is try to handle it gracefully if they do). In an ideal world the end-user wouldn't use the back button from navigating in a web-application; but you can't easily prevent them.

    --
    "That's the way to do it" - Punch
  27. This still happens? by cascadingstylesheet · · Score: 1

    Dang but I love script blockers.

  28. Re:Curious how they tell legitimate from illegitim by MobyDisk · · Score: 1

    Sorry, I was typing it on my phone, LOL!

    With Firefox, hold down the back button (well, on the desktop versions) and it displays a history of pages. So you can go back two pages, or 3, or more with one click. That helps to get around the nasty ones.

    Slashdot does this too when accessing the site from Chrome on Android. Clicking the number of comments on a story attempts to open multiple popups, then directs you to sites full of redirects. The real problem is web site operators allowing advertising companies to put scripts onto the page. It wasn't so bad when the ads were square images with a single around them.

  29. Re: Curious how they tell legitimate from illegit by reanjr · · Score: 1

    Or those who aren't web developers don't know the internals well enough to make an informed opinion.

  30. Re:Open LinkIn New Tab. Close Tab. by fibonacci8 · · Score: 1

    So the next move is exploits that hijack opening a new tab. Several sites already interfere with ctrl-left mouse clicks that should open in a new tab. Bets on the availability to interfere with right click, open in new window/tab?

    --
    Inheritance is the sincerest form of nepotism.
  31. Re:While they are at it by hackwrench · · Score: 2

    They have turned it off for quite some time now and if they made sure it never happened when you were in a textbox I wouldn't have minded it. But CTRL Left arrow doesn't work and I don't know if it ever worked on Chrome, but it has on some browser.

  32. Re: Curious how they tell legitimate from illegiti by jenningsthecat · · Score: 3, Interesting

    And then in that case, you take control of the back button so it doesn't break the experience.

    No, in that case you provide a clearly marked Back button or link as part of YOUR interface. If necessary, you add a brief explanation as to why YOUR back button is better in the current context than the browser's Back button. Don't be messing with MY interface - Home, Forward, Back, and Stop buttons. When you screw with those, you've 'broken the experience' by definition, you've created non-standard behaviour, and you've pissed me off to the extent that your site is on my shitlist and I won't be visiting it again.

    --
    'The Economy' is a giant Ponzi scheme whose most pitiable suckers are the youngest among us and the yet-unborn.
  33. But it might break many sites by SurenEnfiajyan · · Score: 1

    YouTube uses a similar technique, when a new video is opened it actually doesn't reload the page despite that the URL changes. The user might want to go back to continue watching the previous video. So how will Chrome know whether this technique is malicious or not? Please tell me if I'm wrong.

  34. Re:Curious how they tell legitimate from illegitim by Oswald+McWeany · · Score: 1

    BTW, over the years I've experienced MANY warnings about not using the Back button, so it's not as though I just pulled the idea out of my ass.

    Yeah... and it doesn't work. People still click the back button.

    --
    "That's the way to do it" - Punch
  35. Re:Curious how they tell legitimate from illegitim by thegarbz · · Score: 1

    Not to trap them, but to provide functionality.

    Nope. You've broken the concept of the back button as well as the usability guidelines for some operating systems. If you want to provide functionality you should do it via the appropriate means. Changing the defined functionality of something is not appropriate.

  36. Re: Curious how they tell legitimate from illegiti by thegarbz · · Score: 1

    but If a click simply loads new content into the same page

    Then you should make it clear to the user that the context of your page has a different interface than the standard one they expect, and not change the defined behaviour of an existing system which has a different functionality.

  37. Re: Curious how they tell legitimate from illegiti by skids · · Score: 1

    Yeah, that seems like the most reasonable approach. You only get one per click (or kb enter outside a textbox)

  38. Re:I don't like to do it. by DontBeAMoran · · Score: 1

    Do you work for free? Your boss only allowed X hours to do the job. And your apps would need to be compatible with older devices no longer supported by the companies so what the fuck would you do?

    --
    #DeleteFacebook
  39. Re: Curious how they tell legitimate from illegit by reanjr · · Score: 2

    The reality is you are probably experiencing this history rewriting on tons of sites without even realizing it, but you don't have a problem with it because it works "as expected".

  40. Re: Curious how they tell legitimate from illegiti by toddestan · · Score: 1

    The standard behavior is to let websites screw around with the browser's history. If it's done properly it's practically invisible - sure if you're watching for it you'll see the manipulation going on, but to most users the browser's back button does actually do what they expect it too and they are completely oblivious as to what actually happened and the technical details of how the website really works. However, like a lot of things on the web that were created to make things more user-friendly, this can also be abused by malicious and shitty websites that are up to no good or like being annoying.

    However, if you really don't like it, why don't you take control of your browser and not allow websites to rewrite your browser's history? The source code behind the most popular browsers is available, so have at it. Or there may even be an extension available. Then you can go party like it's 1996 all over again.