It's not the fist time that i stuck to this problem. Everytime when i use an 301 redirect, the browser caches it. When i change the redirect in my app, i manualy have to clear my browsers cache.
This is not very welcome for an website as you will understand. Is there an solution to avoid this caching?
Currently i got an list of new redirects from my customer. In my .htaccess, i replaced the old ones for the new ones, but it doesn't toke effect.
When i cleared my browser cache, it seems to work propper.
Any solutions? Thanks a lot!
To quote the HTTP specification on the 301 status code:
301 Moved Permanently
The requested resource has been assigned a new permanent URI and any future references to this resource SHOULD use one of the returned URIs. Clients with link editing capabilities ought to automatically re-link references to the Request-URI to one or more of the new references returned by the server, where possible. This response is cacheable unless indicated otherwise.
Hence, the fact that browsers cache the redirected URI shouldn't be a surprise, since it's done as specified.
To get around this problem, most sites use 302 (307 could also be used).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With