Wednesday, March 14, 2007

Flash in IE6 xml compression problem

Problem:

There seems to be a problem with flash player running on IE6 loading XML files from a web server which has compression enabled. It seems like the XML is never decompressed correctly, so whatever flash that is using it breaks. Everything seems to work fine if you use firefox or IE7 to access the same flash swf. I found one page talking about this problem, right here:

http://blog.mediacatalyst.com/pivot/entry.php?id=281

Solution:

First let me say, that on our servers the XML was generated by a JSP, so i had a bit more control over html headers and such. This is what i did to solve this problem:
  1. Set Cache-Control HTML header to nothing ("")
  2. Set Pragma HTML header to nothing
  3. Make sure that the XML file had the XML declaration as the very first thing in the file
  4. Set the JSP page content-type to text/xml

2 comments:

  1. Thanks (a ton) for this pointer Mikhail, saved me loads of time debugging our Flash xhtml parsing system we just launched. Starting to think that IE 6 is, in fact, the devil in disguise :)

    ReplyDelete