Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Precompression for (pipelined) assets (nginx::gzip_static support). #1621
Compressing resources on-the-fly adds CPU-load and latency (wait for the
If you enable gzip_static, nginx will look for $filename.gz and serve
This feature adds support to directly compress asset files when they are
Since you only have to compress every resource only once, using the
referenced this pull request
Aug 26, 2017
For other webservers it will not cause problems, as it is merely creating an additional file.
nginx supports it by default without requiring any extra work. However, support is not limited to nginx. Other webservers can also make use of it, if configured accordingly. Some searching can find some ways to set it up:
I'm sure it could work in any webserver software as long as you configure it properly.
If I could've done it in a plug-in, I would've. I have purposefully avoided using "nginx" in the code / descriptions of things, as it is what it is: precompression of files. I understand that it might seem unusual to put this in the core, but to me it didn't really seem to have another place. It's either upon creation of said resources, or doing everything by hand externally out of Grav, not knowing when asset files are created.