18 April 2008
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:
- 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>
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.
20 August 2007
If you don’t use Adobe LifeCycle blabla, you set httpService.useProxy = false. This has the following implication on HTTPService:
- The property method allows only GET and POST.
- The property headers has no influence. This means that caching depends on the implementation of the browser and it is at no control of the programmer. You guessed it that IE brings all the trouble.
- The method setCredentials becomes useless. HTTP Basic authentication can’t be handled automatically by Flex. The browser needs to ask the user for the credentials.
- 20x HTTP Status arrive fine but the rest are always 50x! Forget about 404, 401, etc
Unfortunately, the source of HTTPService is not released. But hey, why would you use HTTPService if there is an alternative? You could easily write your own socket for the HTTP protocol. For example, Abdul Qabiz has written some nice classes in AS3HTTPclient. It features:
- Standard or custom HTTP headers. Besides controlling caching, this enables HTTP Basic Authentication without any browser window. Note that you need to replace the Base64 class with a working one.
- HTTP Status messages
- Copying bytes like uploading files
Even though Flash does not offer any built-in support for SSL, Adbul plans to add it. I’m not sure whether I will want to use a home brew SSL instead of the implementation of the browser. First, the browser has been tested extremely thoroughly and second for performance reasons. I will check again once it’s out.
10 July 2007
Fiona is like you and me: she expects her computer to support her. Lets suppose that Fiona needs a nice picture of a fish, but where should she enter “fish” for searching???
- Additionally, Fiona is unsure about the “Go”- or “Search”-button.
- If she wants to search the page, she needs to go the menu “Edit” and click “Find in this page…”, or rather “Find again”? (Try to find it in IE 7!)
Folks, we can do better!
3 June 2007
Today, I definitely got fed up with this page:
Why is it annoying?
- I always read feeds in Google Reader, hence I never need to make a choice between the Google Homepage and the Reader.
- Quite often, I only want to see the xml. This is not possible on this page.
So here’s the fix:
- Go to the configuration in Firefox: Type about:config in your url field
- Search for browser.contentHandlers.types.2.uri
- Set it to
- Restart Firefox
- And everything is again as it used to be…