I'm targetting a couple of web projects at mobile users, and noticed that some of the standard tools (JS libraries, json transfers, xml etc) are quite heavy for mobile data plans.
I'd like to be able to implement gzip'd resources, and probably mod_deflate/mod_gzip to try and reduce the amount of bandwidth used by these devices.
However, I don't know how widespread support for gzipped javascript, gzipped html etc. is on mobile devices, or even if it is mon practice to use...? It seems to make sense though.
Is it ok to use as a solid tool for the mon mobile devices..? iPhone, android, blackberry, windows mobile/opera..?
Thanks.
I'm targetting a couple of web projects at mobile users, and noticed that some of the standard tools (JS libraries, json transfers, xml etc) are quite heavy for mobile data plans.
I'd like to be able to implement gzip'd resources, and probably mod_deflate/mod_gzip to try and reduce the amount of bandwidth used by these devices.
However, I don't know how widespread support for gzipped javascript, gzipped html etc. is on mobile devices, or even if it is mon practice to use...? It seems to make sense though.
Is it ok to use as a solid tool for the mon mobile devices..? iPhone, android, blackberry, windows mobile/opera..?
Thanks.
Share Improve this question asked Jul 8, 2010 at 10:04 danpdanp 15.3k7 gold badges46 silver badges48 bronze badges4 Answers
Reset to default 7I don't think it matters, a browser will request GZipped data if it supports it, so your server will only GZip it if your browsers asks it to.
As far as I know most of them supports it, but if you configure you're server well it will be able to send non-pressed resources if needed.
Another benefit is that you improve caching as some devices like iPhone has limits of 25k for a content to be cached.
So the short answer is: Just Do It
mod_deflate
/ mod_gzip
will check the client's "accept" headers and turn pression on or off accordingly.
Just turn it on in your server, and make sure your js
and css
resources get pressed as well. You can use Firebug's "Net" tab to check whether pression was applied to the loaded resources.
If pression is mising for certain file types, check out this question for how to turn it on.
Go for it - the gzipped version should be only sent if a browser sends an Accept-Encoding: gzip
(and the modules check for this automatically). (see the relevant part of RFC 2616)
(the usual warning applies - some browsers are broken. For example, IE6 advertises gzip-capability but doesn't actually support it properly. For mobile browsers, I haven't encountered such brokenness yet - so far every mobile browser that advertised gzip supported it)