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?
@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: IE 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.)