Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Precompression for (pipelined) assets (nginx::gzip_static support). #1621

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Commits on Aug 24, 2017

  1. Precompression for (pipelined) assets (nginx::gzip_static support).

    Compressing resources on-the-fly adds CPU-load and latency (wait for the
    compression to be done) every time a resource is served. nginx offers
    another way of doing things, and it's called gzip_static.
    
    http://nginx.org/en/docs/http/ngx_http_gzip_static_module.html
    
    If you enable gzip_static, nginx will look for $filename.gz and serve
    that directly, so no extra CPU-cost or latency is added to your
    requests, speeding up the serving of your website.
    
    This feature adds support to directly compress asset files when they are
    written to disk by the Grav\Common\Assets class. Using this feature you
    can also specify the compression level (default to the maximum of 9).
    
    Since you only have to compress every resource only once, using the
    maximum compression level is an ideal default.
    Daniël Mostertman committed Aug 24, 2017
    Configuration menu
    Copy the full SHA
    5ed98ef View commit details
    Browse the repository at this point in the history