Gzip and Vae
  • Is it possible to use Gzip compression on a Vae site?

  • 9 Answers sorted by
  • Anything on the CDN (<v:asset> or <v:cdn> or <v:img> etc.) will be GZipped automatically?

  • Simple enough. Thanks!

  • Hi,
    I ran a couple of tests and neither static assets served by nginx (CSS, JS, XML) through v:asset or v:cdn or textual data served via apache (HTML, json) are being gzipped.

    (I'm using vaeplatform.com for tests since the site I'm working on isn't yet live)

    Headers for a v:asset file:
    $ curl -I -H "Accept-Encoding: gzip, deflate" http://verb.vaesite.net/__data/133db69f67fee6e87b3cad5d47b45668.js
    HTTP/1.1 200 OK
    Server: nginx/0.7.65
    Date: Fri, 17 Jun 2011 02:28:18 GMT
    Content-Type: application/x-javascript
    Content-Length: 54035
    Last-Modified: Wed, 30 Mar 2011 05:00:13 GMT
    Connection: keep-alive
    Expires: Thu, 31 Dec 2037 23:55:55 GMT
    Cache-Control: max-age=315360000
    Accept-Ranges: bytes

    and for an HTML file:
    curl -I -H "Accept-Encoding: gzip, deflate" http://vaeplatform.com/cms-testimonials
    HTTP/1.1 200 OK
    Date: Fri, 17 Jun 2011 02:34:52 GMT
    Server: Apache
    Content-Location: cms-testimonials.haml
    Vary: negotiate
    TCN: choice
    Set-Cookie: VerbSession=teo3vvbhp92q40gpreb8ltp5f5; expires=Sat, 18-Jun-2011 02:34:52 GMT; path=/
    Expires: Thu, 19 Nov 1981 08:52:00 GMT
    Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
    Pragma: no-cache
    Connection: close
    Content-Type: text/html

    If it were gzipped you would see:
    Content-Encoding: gzip
    Content-Encoding: deflate

    Any chance this could be added? It's considered a safe and easy to implement optimization to add globally and would definitely provide a noticeable improvement by a large number of clients.

    All the best,

  • Hey Ryan,

    Thanks for pointing this out! This turned out to be a MIME type configuration error. Give it a try now!


  • Hi Kevin,
    Thanks for the quick response! It's working for css and javascript on nginx, but Apache content (text/html) still isn't compressing. Any chance you could enable that?


  • Kevin,
    CSS/JS served through Apache also still isn't getting compressed (it can't necessarily be placed in v:asset).


  • v:asset is actually for css/js file includes, I will switch the includes to use v:asset and then could you test it out again?

    Edit: looks like they are already switched so nevermind.

  • Yes, we do this to encourage you more highly to use <v:asset>

  • Any reason HTML served from Vae isn't gzipped as well? I'm seeing a pretty significant space-saving potential on pages with a lot of HTML content.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

In this Discussion