RE: Support for compression in XHR?

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?


Hello,

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.
http://lists.w3.org/Archives/Public/public-webapps/2008JulSep/0596.html


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.

Dom

1.
http://lists.w3.org/Archives/Public/public-webapps/2008JulSep/0597.html

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