Is gzip compression available for GitHub pages?

11,098

Solution 1

As covered here, GitHub Pages is served with Nginx and automatically gzip's content.

You can confirm gzip compression for your site by checking the HTTP headers with online tools like this one. Enter the URL to a webpage or resource, and type in gzip under "Accept-Encoding" to indicate that the HTTP client (i.e., the online testing tool in this case) accepts gzip compression, as most browsers do.

You might review the other information and suggestions here to optimize serving as well.

Solution 2

besides Dan's answer, depending on your static-site generators, there can be some plugins that make the compressed .gz-ed version offline while generating the site. By that way, your server can serve those gz-ed pages directly.

For example, Pelican users can use gzip_cache. For Jekyll, there's jekyll-press,

Share:
11,098

Related videos on Youtube

Gowtham
Author by

Gowtham

Updated on September 18, 2022

Comments

  • Gowtham
    Gowtham over 1 year

    I'm using GitHub pages to host my site. While checking Google PageSpeed Insights, it recommends that I enable gzip compression. Since I have a static site hosted on GitHub, I'm not sure that is possible.

    Is it possible to enable gzip compression on GitHub?