Using gzip automatically

Surge automatically Gzips all appropriate assets for you, as part of our Lucid Caching strategy. There is no additional action required once you’ve published. This happens for all:

  • .html files
  • .css files
  • .js files
  • .json files
  • .txt files
  • .svg files

You can check any live site on Surge for these Gzip compression headers.

[![](/images/help/using-gzip-automatically.png)](http://checkgzipcompression.com)
Here, [Check Gzip Compression](http://checkgzipcompression.com) calculates the performance savings from the Gzip’d assets, for a site on Surge.

Files under 1KB

If you are using developer tools to check Gzip compression on individual files, you may find particularly tiny files have been omitted. Files under a certain number of bytes are actually too small to justify Gzip-ing. For example, if you publish a nearly-empty index.html file, like:

<h1>Hello, world</h1>

…the filesize will be too small to be Gzip’d. Once there is enough content to push the filesize about the 1KB limit, it will be.