I’m developing a Flex application that runs smoothly in Firefox over SSL. Today, I just wanted to verify whether Internet Explorer 7 (IE7) hosts the application as nicely. Somehow, I wasn’t surprised that the Microsoft browser invoked an “Error #2032: Stream Error”.
Don’t assume, test!
Searching brought me to judah’s blog, but the blog is only about URL paths. Because the application runs in Firefox and in non-SSL mode in IE7, this was not causing my problem. However, some comments on judad’s blog and on this blog were interesting: An Adobe TechNote warns of this issue. However, the note was last updated in 2005 what meant that it could not relate to IE7. I also found a Microsoft bug report describing the issue but it only links the bug to IE5 and below. The assumption that Microsoft has corrected this bug since 2005 was probably my biggest mistake in this hole story.
The search could go on. Barton has some nice input and proposes to tamper the HTTP header: remove Pragma and set Cache-Control: no-store. So I did and checked the HTTP headers in the SSL connection with Wireshark (which is also quite bogus for decrypting SSL packets, at least 1.0.0). This made the whole thing running. And in details:
Works:
- Cache-Control: no-store
- Cache-Control: no-store, must-revalidate
- Cache-Control: no-store,max-age=0,must-revalidate
- Cache-Control: max-age=0,must-revalidate
- Cache-Control: must-revalidate
Does not work:
- Pragma: no-cache <+whatever header like Cache-control: no-store>
- Cache-control: no-cache
- Cache-control: no-cache, must-revalidate
- Cache-control: no-cache,<+whatever>
- <empty = no Cache-control at all>
Controlling Cache-Control
In Firefox, you can check the content of the cache by entering about:cache in the URL. You will notice that Firefox caches all data coming from an SSL connection in memory. Hence, closing a tab does not delete the data but a restart of Firefox does.
IE7 caches data coming from SSL normally to the disk. The HTTP header Cache-Control: no-store prevents this default behaviour. Unfortunately, I don’t know a similar command like about:cache in IE7, so haven’t investigated the exact caching behaviour. Cache stored on the disk can be checked with “Tools menu > Internet Options > General Tab > Browsing History section > Settings Button >View Files button” but I don’t know how to see the cache in the memory.
25 April 2008 at 13:02 |
Emm …. in my case header “Pragma: no-cache” return form always server by default…How i can remove it ? Different calling header(…) from php doesnt help, i however see it in some alike Wireshark app.
25 April 2008 at 14:24 |
Hi Zlatko
Last time I used php is about 8 years ago, so I can’t really help out with php. If you use mod_php or you do the encryption with an apache web server, you can modify headers there. Simply link in mod_headers an add ‘Header set Cache-Control “no-cache,must-revalidate”‘, ‘Header unset Pragma’ to the configuration.
25 April 2008 at 14:58 |
Hi Faindu
Got it !
In php.ini leave empty value for key ’session.cache_limiter ‘, and ‘caching’ headers not sended.
Thx !
25 April 2008 at 15:11 |
All right, thanks for the feedback.
2 July 2008 at 11:58 |
[...] Marc Speck [...]
10 July 2008 at 13:58 |
[...] Here it’s suggested that “Cache-Control: must-revalidate” and “Cache-Control: max-age=0″ also work. While that’s true in the sense that they don’t cause an error IE, they don’t seem to prevent caching 100% – there is a timeout. [...]
12 August 2008 at 10:10 |
[...] problem still exists in Internet Explorer 7! Don’t know about Vista… Here it’s suggested that “Cache-Control: must-revalidate” and “Cache-Control: max-age=0″ also [...]
19 September 2008 at 12:44 |
These work when using the maani xml charts – the swf file uses an xml file when displaying chart data.
session_cache_limiter(‘public’);
or:
session_cache_limiter(‘public_no_cache’);
if you’re building your own headers, add:
header(‘Pragma: public’)
or:
header(‘Pragma: public_no_cache’)
19 September 2008 at 14:03 |
Thanks for the feedback, Mark. You are saying that it works with an SSL encrypted HTTP transmission? You also don’t use AMF0/AMF3 and you verified the presence of the headers on the client side, right?
8 October 2008 at 0:07 |
PHP inject ‘Pragma’ and ‘Cache-Control’ on the session_start(); function by default.
To remove it, at easy way with
header(“Pragma:”);
19 November 2008 at 21:39 |
Thank you for the post. I too was wrestling with this issue. My chart data was not showing up in the microsoft browser IE 6 or 7. I played with a bunch of settings and tags. I finally come to a solution that worked good for me. My page does have a SSL connection.
I embedded my movie with code like this. BAM works like a charm.
19 November 2008 at 21:40 |
<!—
—>
16 December 2008 at 12:06 |
Clayton, could you send me your code? I have the same problem with IE not showing flash charts, but Firefox works fine. Maybe if you could post your code somewhere else where it is not stripped out?? Thanks in advance!
16 December 2008 at 13:50 |
Hey Edgeman and Clayton, if you have a link or useful code, I’m happy to post it in the text where wordpress does not suppress it.
16 December 2008 at 23:53 |
[...] check out Jim Robson’s blog and Mark Speck’s blog for more research regarding this issue. Share and [...]
13 January 2009 at 23:53 |
This is absolutely the fix for an issue that has plaqued us for a days now, just in IE, just under HTTPS, just with XML, as stated. Wow — thank you!
30 January 2009 at 22:13 |
Thankyou so much:
ini_set(“session.cache_limiter”, “”);
No I can use my Flex App in IE6.
I had given up hope !
All we need now is a fix for FileUpload under Firefox HTTPS.
Top work !
14 April 2009 at 21:17 |
Using:
ini_set(”session.cache_limiter”, “”);
is what helped my app to work! Thanks guys!
29 April 2009 at 10:58 |
thank you
30 June 2009 at 14:05 |
Hi there – I am still searching resolution. I see that ini_set is PHP specific. I have ASP under SSL which is causing the flash not to show.
I tried Response.CacheControl=”no-store” … didn’t work. Is there something else I can try? Can you post the asp code?
Thanks.
30 June 2009 at 14:48 |
Hi Melissa,
I don’t know ASP, sorry.
Marc
8 July 2009 at 7:30 |
I have the same problem as Melissa.
I have a Flex web app which requests XML back from an ASPX page but changing the header cache-control to “no-store” makes the ASPX page falls over saying “no-store” is an invalid value…. did you (or anyone else) manage to work this out?
17 July 2009 at 16:31 |
You saved my project man… Thank you!!!
2 August 2009 at 12:11 |
You are a lifesaver! Thanks for the detailed post.
4 August 2009 at 3:28 |
CHEERS! You saved my ass!
My flex app was loading XML via HTTPS. The following headers fixed IE7 and IE8:
header (“Cache-Control: no-store,max-age=0,must-revalidate”);
header (“Pragma: public”);
header (“Pragma: public_no_cache”);
header (“Content-Type: text/xml”);
7 September 2009 at 12:44 |
Hello Jazza,
Any idea if it would work on IE6?
Regards
Milind
7 August 2009 at 14:27 |
Wow, what a life saver this post was…THANK YOU SO MUCH!
10 September 2009 at 17:16 |
Hi! I was surfing and found your blog post… nice! I love your blog.
Cheers! Sandra. R.