I'm using cloudControl to develop and deploy a complex web app for mobile devices using Sencha Touch. Even when minified and trimmed of all the fat, both the CSS and the application JS weigh in at about 250KB each. I'd like to reduce this significantly (especially since it has to load quickly over sketchy mobile connections). Does anyone know if cloudControl offers gzip compression as an add-on? If not, can anyone recommend a PHP-based cloud host that does offer compression?
Asked
Active
Viewed 115 times
1 Answers
0
Gzip is enabled by default. And used if the Accept-Encoding header in the request is set accordingly.
curl --verbose --header "Accept-Encoding: gzip" http://phpinfo.cloudcontrolled.com | gunzip
> GET / HTTP/1.1
> User-Agent: curl/7.24.0 (x86_64-redhat-linux-gnu) libcurl/7.24.0 NSS/3.13.5.0 zlib/1.2.5 libidn/1.24 libssh2/1.4.1
> Host: phpinfo.cloudcontrolled.com
> Accept: */*
> Accept-Encoding: gzip
>
< HTTP/1.1 200 OK
< Content-Type: text/html
< Server: Apache
< Vary: Accept-Encoding
< Content-Encoding: gzip
< Content-Length: 12405
< Accept-Ranges: bytes
< Date: Mon, 07 Jan 2013 18:51:45 GMT
< X-Varnish: 1115551696
< Age: 0
< Via: 1.1 varnish
< Connection: keep-alive
< X-varnish-cache: MISS
<
You can always configure it to your needs using a .htaccess file. See the mod_deflate documentation for more details.

pst
- 1,414
- 11
- 22
-
Thank you! Looks like I was able to get it working (or at least test it) by messing with the mod_deflate settings. – MisterSleep Jan 09 '13 at 03:35