Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

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.

share|improve this answer
no, I've tested the site with the Google PageSpeed insights and it reported about the usage of gzip. And, also GitHub doesn't seem to be using gzip by default. – Danny Archer Dec 30 '13 at 14:58
Have you checked the HTTP headers - what is the URL to your GitHub site? What makes you think it doesn't use gzip? Just because Google PageSpeed Insights recommends enabling gzip, doesn't necessarily mean it isn't already enabled - you need to check that as a browser would by looking at the HTTP headers returned from the server itself. – dan Dec 30 '13 at 20:38
It is showing gzip encoding: click here, select Accept-Encoding: gzip and select Opera 9.2 from User agent. Look for: Content-Encoding: gzip. Note that this is being served through CloudFlare (see here), which caches content and serves it from different servers according to which one is closest to the client. Therefore, you might receive another server in the network - just recheck it (refresh the page results several times). – dan Jan 1 '14 at 7:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.