It is a bit annoying that chrome don’t have a Clear Redirect Cache functionality.
Example use case:
- 301 Redirect incorrectly added from https://abc.test to https://abc-false.test
- We visited the abc.test and got redirected to the abc-false.test
- It was incorrect, we updated the redirect to from https://abc.test to https://abc-true.test
- We visited the url https://abc.test, but it still redirect us to the incorrect url (abc-false.test)
- This is because chrome cached this redirect.
The workaround very easy. Here’s how:
- Navigate to the other URL in the source domain. example: https://abc.test/some-url
- Open DevTools (right-click > inspect)
- Navigate to Console tab
- Type this code and enter.
fetch('https://abc.com', {method: 'post'}).then(() => {})
you will see the script running and print something like:
> Promise {<pending>}
And that’s it. Try to visit the https://abc.test and you’ll redirected to the right URL.