What content should be compressed

As mentioned in the What is GZIP compression, the gzip can reduce size of the response by approximately 70%. You should apply gzip to all text response such as


  • HTML

  • XML

  • JSON

  • CSS

  • JavaScript



But applying gzip to binary content is not a good idea. For example content such as images, pdfs, .tar, .zip files are already compressed trying to compress them again will require CPU and it might be counter productive. So you should not compress


  • Images

  • EXE

  • PDF

  • .ZIP

  • JavaScript

1 comment: