W3C home > Mailing lists > Public > public-bpwg@w3.org > September 2008

RE: Support for compression in XHR?

From: Sullivan, Bryan <BS3131@att.com>
Date: Tue, 9 Sep 2008 10:13:50 -0700
Message-ID: <8080D5B5C113E940BA8A461A91BFFFCD09B3F3C8@BD01MSXMB015.US.Cingular.Net>
To: "Dominique Hazael-Massieux" <dom@w3.org>, "public-bpwg" <public-bpwg@w3.org>
Hi Dom,
I think you mean in " in what circumstances should you send back gzipped content " that "you" is the server. In that case, the decision on whether to use compression or not is an application issue. There are various generic/valuable reasons to compress (e.g. to save bandwidth/cost/latency) but in the end it usually just comes down to server configuration (most HTTP servers are configured to automatically serve HTTP compressed content) and client support (most HTTP stacks support HTTP compression and should announce this).

Best regards,
Bryan Sullivan | AT&T

-----Original Message-----
From: public-bpwg-request@w3.org [mailto:public-bpwg-request@w3.org] On Behalf Of Dominique Hazael-Massieux
Sent: Tuesday, September 09, 2008 9:43 AM
To: public-bpwg
Subject: Fwd: Support for compression in XHR?


I asked on the Web Apps WG mailing list if there was any specific
support for compression in XmlHttpRequest (trying to make progress on
Chaals's ACTION-689), and got the following answer:

-------- Message transféré --------
> De: Boris Zbarsky <bzbarsky@MIT.EDU>
> À: Dominique Hazael-Massieux <dom@w3.org>
> Cc: public-webapps@w3.org
> Sujet: Re: Support for compression in XHR?
> Date: Tue, 09 Sep 2008 09:02:44 -0400
> Dominique Hazael-Massieux wrote:
> > The Mobile Web Best Practices Working Group is interested to know
> > whether XmlHTTPRequest has any actual or planned support for compression
> 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.

This doesn't tell how to do outgoing compressed XHR (as I pointed out in
my reply [1]), but this probably is the state of the art in XHR matters:
you can get back gzipped responses from XHR request if the browser sets
the Content-Encoding or Transfer-Encoding header (which it should), and
the server decides to do so (which might be more context dependent);
there is no clear support for making POST requests with a gzipped body.

I guess the main question on compression remains open: in what
circumstances should you send back gzipped content? We probably should
open an issue on that one.



Received on Tuesday, 9 September 2008 17:14:43 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:09:52 UTC