2 minutes read

During Speed testing of your website or web application using LoadFocus ( on the Advice section you might get the tip that you need to enable compression like in the image below:




Compressing responses often significantly reduces the size of transmitted data.
Because the compression happens at runtime this can add a big processing overhead which can affect the performance in a negative way.

Nginx if configured correctly compresses the responses before sending them to the clients and does not double compress the responses which have been already compressed.

In the next tutorial we will show how you can enable compression in case you are using Nginx to serve your files.

1. First locate the Nginx configuration file – nginx.conf
2. Once you located the file open the file and make sure that inside the configuration you can find the following flags:

<strong>gzip on</strong>;
<strong>gzip_disable</strong> "msie6";

<strong>gzip_vary</strong> on;
<strong>gzip_proxied</strong> any;
<strong>gzip_comp_level</strong> 5;
<strong>gzip_buffers</strong> 16 8k;
<strong>gzip_http_version</strong> 1.1;
<strong>gzip_min_length</strong> 1000;
<strong>gzip_types</strong> text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;

3. Explanation of the flags: is a Cloud Testing Platform used for Load and Performance Testing for Websites and APIs and Website Speed Testing with Analytics.

Thanks for reading. I hope you learned something interesting about React!
If you found this article useful, please share it with others. Don’t forget to subscribe to get notified for the upcoming articles.