I am working on a web application that is using redirects (for pretty URLs).

I am trying to debug logic in the way the redirects are working. However Google Chrome keeps remembering the redirects and even after I change the code, redirecting the same way.

This is making it very hard to troubleshoot.

For example if I redirect /this to /that, then change my code to NOT redirect /this anymore. Google Chrome is still redirecting to /that. Like the redirect is cached or something. Is there a way to turn this off?

link|improve this question

69% accept rate
Does this still happen when you restart? It should stop after you restart with a fresh session – random Jun 30 '11 at 17:12
@random, restarting chrome does seem to fix it. However, I usually have a lot of windows open (ie: docs, db connections, tutorials, the page I am working on, etc.) If I am troubleshooting something it can take several tries before figuring out whats going on. I wouldn't really consider it ideal to have to keep closing all my windows. Thanks. – John Isaacks Jun 30 '11 at 17:22
feedback

2 Answers

up vote 3 down vote accepted

Google Chrome will cache your 301 redirects. To get around this, and to keep the tabs open, you'll just need to clear your browser cache.

Wrench > Options > Privacy > Click Clear browsing data...

Whatever else you select, make sure "Empty the cache" is a checked option.

Then click Clear browsing data and you should be able to retest again.

Alternatively, test and develop in incognito mode. There the cache is flushed after the browser is closed.

link|improve this answer
Thanks, I think I'll do it incognito. – John Isaacks Jun 30 '11 at 17:53
feedback

If you just want to check the redirects are working as expected it's probably easier to use a command line tool like wget or similar. You can inspect the response headers and redirects are not cached.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.