Connect with us

Technology

Chrome browser to stop websites abusing the back button

Published

on

Image: Thomas Trutschel / Photothek via Getty Images


PCMag.com is a leading authority on technology, delivering Labs-based, independent reviews of the latest products and services. Our expert industry analysis and practical solutions help you make better buying decisions and get more from technology.

Regardless of the web browser you use, we all rely on the back button to return to the previously visited page. But some websites abuse the back button to stop you leaving. It’s infuriating, but soon to be a thing of the past for Chromium-based browsers.

As Naked Security reports, the developers behind the Chromium open source browser, which Google Chrome (and the new Edge browser) are built around, are introducing new behavior to stop websites from breaking back button functionality.

There are two ways a website can currently break the back button. The first is by introducing redirects which sees a website first load another page that instantly redirects to the intended website. By doing that, clicking the back button simply loads the previous page which once again redirects back to the page you are attempting to leave.

The second method is called history manipulation. The back button relies on your pages visited history to know which previous page to load. It’s possible to add multiple “pushState” commands to this history (thanks to HTML5) which stops the previous page from loading. These pushState commands can be stacked up so it doesn’t matter how many times or how quickly you keep pressing the back button it will never leave the page you are on.

The new behavior being introduced to Chromium means anything added to the history that didn’t require a “user gesture” will be ignored in future. So a redirect page or pushState commands won’t work anymore much to the frustration of websites using this underhanded technique, but much to the relief of users who hate being trapped like this.

The behavior change will be available across all platforms including Windows, Mac, Linux, Chrome OS, Android, and Android WebView. It’s already approved for launch so should appear in a future update for all major browsers using Chromium soon.

Uploads%252fvideo uploaders%252fdistribution thumb%252fimage%252f91228%252f694e8482 dfb0 466f bf8a d4f5eb85cd24.jpg%252foriginal.jpg?signature=dhuexoc7a4cipkx4mdz92if qws=&source=https%3a%2f%2fblueprint api production.s3.amazonaws

This article originally published at PCMag
here

Continue Reading
Advertisement Find your dream job

Trending