Internet Explorer https no-cache no-load

Jan 29, 2011

Tags: ,

Every Web Developer hates Internet Explorer, from its horrible non-w3c compliant Trident rendering engine to its equally terrible JavaScript engine every web developer has some kind of reason to despise it. I know I can hear you IE fan boys screaming but IE9 is so much better... that it may be but last time I checked it was a beta with no proposed release date. For us Flash Developers IE usually doesn't pose much of an issue but turns out one of the worst of "modern" browsers on the web does cause some grief for us Flash Developers.

While looking into an issue with a client for Webbuilders Group in which the photo carousel was not working on their home page. I tried the website in Firefox and I could not reproduce the issue I noted in Internet Explorer which seems to be the browser of choice for many of our clients (cries), the debug flash player was complaining of an IOError #3235 which was an issue with the request failing. So naturally I started by following the server error logs and refreshing the page but came up empty, no error in the logs.

So I did a quick search on Google to try and figure out the issue. It turns out IE has an issue handling secure connections when no-cache headers are being sent. Using one of the most essential tools in a web developer's toolkit Firebug to look at the response headers when I requested the xml file via Firefox it showed that the CMS (SilverStripe) powering the website was sending various no-cache headers. After some further researching I came across a potential way of resolving the issue, simply not sending the no-cache headers, or in this case overriding them to convince IE that it can cache the response even though I am using a url parameter to force all browsers to re-cache the response regardless. Most server side languages can alter headers being sent on the response, so just look up for your favorite language how to send no-cache headers, then just do the opposite. With PHP this is done with the following code.

header('Cache-Control: max-age=180, must-revalidate');

I guess its just IE reminding you that just because your not using their terrible rendering engine doesn't mean that your immune from the terrible browser.

Posted in: Articles |