In the absense of cache control directives that specify otherwise, a 301 redirect defaults to being cached without any expiry date. IE10 and Chrome 25 cache, but do not clear on browser restart, so when will they clear?.Firefox 18.0.2, Safari 5.1.7 (on Windows 7), and Opera 12.14 all cache, and clear the cache on browser restart. IE7, IE8, Android 2.3.4 do not cache at all.The headers for the incorrect 301 response would have been like this: HTTP/1.1 301 Moved Permanently Upon investigation, I find that there were no Cache-Control and Expires headers set. I can correct the mistake, but anyone who has visited 1.example in the meantime will have cached the incorrect redirect to 3.example, and so they will not be able to reach either 1.example or 2.example until their cache is cleared. When do IE, Chrome, Firefox and Safari clear their cache of 301s?įor example, if I want to redirect 1.example to 2.example, but I accidentally set it to redirect to 3.example, that is a problem. After a quick test, it seems that Safari clears its cache of 301s when it is restarted, but Firefox does not. I am debugging a problem with a HTTP 301 Permanent Redirect.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |