W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2008

Re: Support for compression in XHR?

From: Jonas Sicking <jonas@sicking.cc>
Date: Tue, 09 Sep 2008 15:27:28 -0700
Message-ID: <48C6F850.3060203@sicking.cc>
To: Geoffrey Sneddon <foolistbar@googlemail.com>
CC: Dominique Hazael-Massieux <dom@w3.org>, Boris Zbarsky <bzbarsky@MIT.EDU>, public-webapps@w3.org

Geoffrey Sneddon wrote:
> 
> 
> On 9 Sep 2008, at 14:58, Dominique Hazael-Massieux wrote:
> 
>>
>> Le mardi 09 septembre 2008 à 09:02 -0400, Boris Zbarsky a écrit :
>>> HTTP has Content-Encoding and Transfer-Encoding, no?  No special effort
>>> on the part of XMLHttpRequest is needed to make use of those, as long as
>>> the underlying HTTP implementation supports them.
>>
>> Well, at least when an outgoing XmlHttpRequest goes with a body, the
>> spec could require that upon setting the Content-Encoding header to
>> "gzip" or "deflate", that the body be adequately transformed. Or is
>> there another e.g. to POST a gzip request with Content-Encoding?
> 
> Why can it not just be added transparently by the XHR implementation?

I doubt that it could. An UA implementation won't know which encodings 
the server supports.

I suspect compression from the UA to the server will need support on the 
XHR object in order to work. I don't think the right way to do it is 
through setRequestHeader though, that seems like a hack at best.

/ Jonas
Received on Tuesday, 9 September 2008 22:29:27 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:27 GMT