{"id":93,"date":"2009-03-20T12:08:42","date_gmt":"2009-03-20T10:08:42","guid":{"rendered":"http:\/\/www.crydust.be\/blog\/?p=93"},"modified":"2009-08-31T14:18:03","modified_gmt":"2009-08-31T12:18:03","slug":"ie8-aggressive-caching-fix","status":"publish","type":"post","link":"http:\/\/www.crydust.be\/blog\/2009\/03\/20\/ie8-aggressive-caching-fix\/","title":{"rendered":"IE8 aggressive caching fix"},"content":{"rendered":"<p>Apparently Internet Explorer 8 has a more aggressive caching mechanism than any other browser I&#8217;ve ever met. To fix it I&#8217;ve added the following to almost every dynamic page on my server.<\/p>\n<pre class=\"prettyprint\">\r\n&lt;%\r\n\/\/ prevent caching (asp classic jscript)\r\nResponse.CacheControl = &quot;no-cache&quot;;\r\nResponse.AddHeader(&quot;Pragma&quot;, &quot;no-cache&quot;);\r\nResponse.Expires = -1;\r\n%&gt;\r\n<\/pre>\n<pre class=\"prettyprint\">\r\n&lt;%\r\n' prevent caching (asp classic vbscript) '\r\nResponse.CacheControl = &quot;no-cache&quot;\r\nResponse.AddHeader &quot;Pragma&quot;, &quot;no-cache&quot;\r\nResponse.Expires = -1\r\n%&gt;\r\n<\/pre>\n<pre class=\"prettyprint\">\r\n&lt;?php\r\n\/\/ prevent caching (php)\r\nheader('Cache-Control: no-cache');\r\nheader('Pragma: no-cache');\r\nheader('Expires: ' . gmdate(DATE_RFC1123, time()-1));\r\n?&gt;\r\n<\/pre>\n<pre class=\"prettyprint\">\r\n\/\/ prevent caching (C#)\r\n\/\/Response.AddHeader(&quot;Cache-Control&quot;, &quot;no-cache&quot;);\r\n\/\/Response.AddHeader(&quot;Pragma&quot;, &quot;no-cache&quot;);\r\n\/\/Response.Expires = -1;\r\n\r\nResponse.Cache.SetCacheability(HttpCacheability.NoCache);\r\nResponse.Cache.SetNoStore();\r\nResponse.Cache.SetExpires(DateTime.MinValue);\r\n<\/pre>\n<p>More information here: <a href=\"http:\/\/support.microsoft.com\/kb\/234067\">How to prevent caching in Internet Explorer<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Apparently Internet Explorer 8 has a more aggressive caching mechanism than any other browser I&#8217;ve ever met. To fix it I&#8217;ve added the following to almost every dynamic page on my server. &lt;% \/\/ prevent caching (asp classic jscript) Response.CacheControl &hellip; <a href=\"http:\/\/www.crydust.be\/blog\/2009\/03\/20\/ie8-aggressive-caching-fix\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-93","post","type-post","status-publish","format-standard","hentry","category-asp"],"_links":{"self":[{"href":"http:\/\/www.crydust.be\/blog\/wp-json\/wp\/v2\/posts\/93","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.crydust.be\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.crydust.be\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.crydust.be\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.crydust.be\/blog\/wp-json\/wp\/v2\/comments?post=93"}],"version-history":[{"count":10,"href":"http:\/\/www.crydust.be\/blog\/wp-json\/wp\/v2\/posts\/93\/revisions"}],"predecessor-version":[{"id":142,"href":"http:\/\/www.crydust.be\/blog\/wp-json\/wp\/v2\/posts\/93\/revisions\/142"}],"wp:attachment":[{"href":"http:\/\/www.crydust.be\/blog\/wp-json\/wp\/v2\/media?parent=93"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.crydust.be\/blog\/wp-json\/wp\/v2\/categories?post=93"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.crydust.be\/blog\/wp-json\/wp\/v2\/tags?post=93"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}