Earlier today, Google formally announced a feature that would keep rogue advertisements from taking over the browser and redirecting you to another page. We've been battling these ads ourselves (as documented here, here, here, and so on), as they have often infiltrated even 'safe' ad networks like Google AdSense.

The company said the feature would go live in Chrome 64, which is currently in the Canary and Dev channels, and not expected to be completed until January 2018. Surprisingly, the feature is already built into Chrome (even the stable version), you just have to turn it on.

The process only involves toggling a flag in Chrome's settings to 'Enabled,' and it works on both desktop and mobile. Just copy chrome://flags/#enable-framebusting-needs-sameorigin-or-usergesture and paste it in the address bar (you can't click/tap on it due to security concerns). Then just tap/click the highlighted dropdown menu, change it to 'Enabled,' and restart the browser when asked.

Now you're protected from those nasty rogue ads. You can view a demo here to see it in action. You can enable it on Windows, Mac, Linux, Android, and Chrome OS.

  

Left: Chrome 62; Center, Right: Chrome 64

It's worth noting that on Chrome 62 (the current stable version) these redirects are blocked, but there is no message telling you about them. On Chrome 64, currently in the Dev and Canary channels, there is a message informing you that a redirect was blocked. Also, this feature is still in development, so it may not block all types of redirects at this time.