IE does not support deflate

Source: Internet
Author: User

 

IE does not support deflate

Posted in programming related by zlbruce on 03-09-2010.

Recently, I have been compressing HTTP and learned a little about the relationship between gzip, deflate, and zlib:

  • Deflate (rfc1951): A compression algorithm that uses lz77 and hafman for encoding;
  • Zlib (rfc1950): A simple encapsulation of deflate;
  • Gzip (rfc1952): a format that encapsulates deflate.

We can see that deflate is the core algorithm. The difference between zlib and Gzip is that the header and tail are different, and the actual content is deflate encoded, that is:
Gzip = gzip header + actual content of deflate encoding + end of Gzip
Zlib = zlib header + actual content of deflate encoding + zlib tail

The rfc2616 document in HTTP/1.1 describes that the value of the content-encoding field can be gzip or deflate.
The GZIP format is well supported and very standard. Here we will talk about the deflate format. In the content-encoding description, deflate refers to the zlib format described in rfc1950. That is to say, when content-encoding is deflate, the content should be in zlib format.
However, in fact, if you really follow this standard, you cannot open the page on IE, including IE6, IE7, and IE8. A blank or error occurs. However, other browsers such as Firefox, chrome, and opera can be opened normally. To enable IE to open the page normally, the content must be in the original deflate format, that is, remove the zlib header and zlib tail. I don't know why ie didn't modify this bug. It is reasonable to say that this very simple problem occurs in IE6, and IE8 should not be correct.
To take care of IE, we had to remove the zlib header and zlib tail when compressing deflate. Fortunately, other browsers can handle this original deflate format normally.
Of course, in this case, those who have enough ie only can create a website that IE cannot access normally.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.