views:

875

answers:

2

Hi,

In Firefox, we can customize the default values for HTTP headers, let's say for changing the "Accept-Encoding" header in an HTTP request (type "about:config" in browser and serach for preference "network.http.accept-encoding", you can double click this value and can customize it)

Can this be possible in Internet Explorer?

Recently we faced a problem that our web application doesn't load in IE6.
Further digging the problem revealed that "Accept-Encoding" header is missing in all HTTP requests sent from IE6. So, server is responding with 404 "Not Found" error for all javascript file requests as we maintain only gzipped versions of javascript files due to space constraints.

Please let me know if there is an option in IE to specify values for "Accept-Encoding" header so that it gets sent as part of every request?

+1  A: 

A google search suggests you don't want to send compressed data to IE6 because it can cause corruption and other mysterious problems. (no doubt you can do your own search and find dozens more like this)

Microsoft seem to have "fixed" this problem more than once (e.g. it's listed as fixed in IE6 SP1, and again in IE6 SP2_ yet users continued to report the problem in IE6 SP2, which suggests they have no idea what was actually wrong and most likely just ripped out all the related code and replaced it wholesale in IE7.

So if the web app must work in IE6 (I pity you) then you will probably want to pay the price of holding uncompressed versions of all files. Alternatively you could add a filter to your web app that uncompresses gzip'd files on the fly for IE6 users. This would make IE6 users more CPU hungry and slower to service, but retain the saving of disk space.

tialaramex
+1  A: 

@tialaramex: It's true that Microsoft massively reworked the decompression code in IE7, but as far as I know, all issues with decompression in IE6 have been fixed in patches.

@Naga: IE6 will send the Accept-Encoding header if you have "Use HTTP/1.1" enabled inside Tools / Internet Options / Advanced, and will not if you don't.

However, your design will break in the real world, and it has nothing to do with IE6. If you read Steve Souders' book "Even Faster Websites" you will learn that a wide variety of corporate proxies and local security products will strip out the Accept-Encoding header if found. Hence, you can expect your site to break if you are only willing to return compressed content.

(In response to your actual question, no, there's no config setting that would allow you to send an arbitrary header. Reliably adding custom headers in IE is actually quite difficult, and usually involves writing an Asynchronous Pluggable Protocol wrapper which incurs a performance penalty.)

EricLaw -MSFT-
In IE 6.0, "Use HTTP/1.1" is already checked.I am also thinking on the lines that some security product might be stripping out the "Accept-Encoding" header, [corporate proxy stripping the headers is ruled out in my case as there is not proxy between server and client and both are in the same network] but could not identify which security product installed on desktop is causing this problem and could not find any resources on Net regarding this.Thanks for pointing me to good resource "Even Faster Websites" on this article.
Naga Kiran
Naga Kiran
Did you verify that the server is getting a HTTP/1.1 request from the IE6 client?
EricLaw -MSFT-