I’ve heard about this recently, and I have a few questions:
- Does any browser support this?
- What happens if a browser doesn’t support it, are they left unloaded?
- Can I use this feature on a shared hosting using Apache and PHP5?
- How can I use this feature?
P.S. It’d be related to WordPress, if that matters.
Browsers send a
Accept-Encodingrequest header which will make it clear to the server whether compression is supported. Good news is almost all popular browsers support itServer responds to the request based on if the browser supports gzip (i.e. if the
Accept-Encodingrequest header containsgzipin it). If it is supported, the server responds with gzipped content – indicated by theContent-Encodingresponse header.Check this for how you can configure output compression on Apache HTTPD – Note you’ll need to be able to edit the config file, which you may not be, since you are on a shared hosting server.
Configuring mod_deflate on Apache is all you need to do to start using this feature. It will take care of checking the
Accept-Encodingrequest header and responding accordingly. Make sure you do not force compression by using force-gzip – You can find details regarding this on the link above.