[Greasemonkey] General XmlHttpRequest question: request body compression?

Jeff Barr jeff at vertexdev.com
Wed Oct 5 20:20:09 EDT 2005


Hi Julien,

Do you really want to gzip the request? In most cases the request is
very small and the response is much larger. A large response could be
a candidate for gzipping.

To do this you need to set the Accept-Encoding header per the 
following RFC:

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

To learn about setting the headers, check out the details object
that you pass in to the request:

http://diveintogreasemonkey.org/api/gm_xmlhttprequest.html

Jeff;

Julien Couvreur wrote:
> Is it possible to gzip the body of an HTTP request? How would you do
> that with XmlHttpRequest?
> 
> Thanks,
> Julien
> _______________________________________________
> Greasemonkey mailing list
> Greasemonkey at mozdev.org
> http://mozdev.org/mailman/listinfo/greasemonkey

-- 
* RSS Feeds:       http://www.syndic8.com
* Blog:            http://www.syndic8.com/~jeff/blog/
* Web Services:    http://aws.typepad.com
* Resume:          http://www.syndic8.com/~jeff/resume.html



More information about the Greasemonkey mailing list