As a web developer, it can become frustrating sometimes to deal with 301 redirects when developing website. For example, when using localhost, some of your projects might force SSL. In most cases, when forcing SSL, web servers will send a 301 response along with the redirect headers to point the browser back to https:// requests.
Browsers, wisely, cache these 301 responses to make it faster for a user to get where they want to be. This caching makes for a great user experience when surfing the web. However, it makes for a poor user experience when developing for the web.
To stop redirect in Google Chrome, you cannot just simply clear cache. You must disable the use of cache all together.
- Enable Chrome Developer Tools.
- At the right-hand side of your Chrome Developer Tools panel, you will find an additional menu. From that menu select “Settings”
- Under the “Network” title, there is an option called “Disable cache (while DevTools is open)”. Enable that option.
- Be sure to keep your Developer Tools panel open while you surf the web. With the change you just made to your settings, you will no longer experience the redirects.