Thursday, May 20, 2010

XmlHttpRequest.getAllResponseHeaders and Content-Encoding in IE7 & IE8

A couple of weeks ago we tried to change how our Browserscope Network test for GZIP works and the other night we ran into something peculiar and unexpected - IE7 and IE8 strip the Content-Encoding header for GZIP responses if/when the browser has decoded the response (which it should have). Reading the spec for getAllResponseHeaders, it looks like the only headers which ought to potentially be stripped are Set-Cookie and Set-Cookie2.

The reason this was interesting/annoying is that we were trying to do something other than simply test whether the browser says it can handle GZIP responses (via the Accept-Encoding header) -  we wanted to see if Google App Engine was actually returning a GZIP compressed response, in this case for a static CSS file. Looking at the headers from a packet sniffer it was clear that the Content-Encoding header was coming down the wire, but then in JavaScript - it had disappeared. Amusingly, IE6 showed the Content-Encoding header as being present.

When a user-agent decodes a GZIP response do you think it should strip Content-Encoding header from getAllResponseHeaders()?

Tuesday, May 18, 2010

Ubuntu Lucid Lynx w/ Gnome on the Lenovo T410

Maybe it's happened. I've been using Gnome without dying to switch back to fluxbox for like 3 weeks now. The degree to which I can get Gnome out of my way, combined with the fact that some of its niceties no longer seem janky, unpredictable, or brittle... Dare I say I may be converted?
Also, Lenovo's T410 - this may be by far and away the best laptop I've ever used. The peripherals are in good locations - they moved the stereo jack over to the side (where it belongs, it was very peculiarly in front on the T400), moved the phone jack to the back (what's a modem?!), added a powered USB jack, 4+ hours of full screen battery life, and most importantly - I can actually use this thing on my lap!
Ubuntu has made some serious strides with Lucid Lynx. My typical gripes about gnu/linux (audio, suspend, wireless, etc..) are all fading and the configuration and usability of the system seems recommendable to your average consumer - I never thought I'd see it. Wow. Ok, so let's see how I feel in three weeks ;)