Chrome – Is there a way to make Chrome ask me every time a web page tries to redirect me

google-chromegoogle-chrome-extensions

For example there are a lot of sites like bit.ly. I want Chrome to stop and ask me every time such a site tries to redirect me somewhere.

Best Answer

There are essentially two kinds of redirects, those caused by redirect headers, and those caused by JavaScript.

Redirect headers, like 301, are intended to tell the browser that whatever resource they are looking for is not at the location they are looking, but that the true location is known. This allows the browser to find those resources, instead of a 404 which just tells them the resource is not there.

This kind of redirect is one of the fundamental parts of a web browser, thus there is no easy way to modify the behavior. Chrome is open source, so you can technically do what you are asking, but it would in no way be a simple solution.

The other kind are done by JavaScript. A page loads, and the script on the page tells the browser to load a new page. A simple browser extension could run a script on the page that intercepts all such attempts, and asks the user for permission before allowing them to continue.

Related Question