A certain site's page shows that the compression is not enabled, while it is enabled on a domain

Created:

2017-08-01 06:00:10 UTC

Modified:

2017-08-08 13:11:17 UTC

0

Was this article helpful?


Have more questions?

Submit a request

A certain site's page shows that the compression is not enabled, while it is enabled on a domain

Symptoms

Checking a certain site's page (example.com/page.html) using for example, PageSpeed, shows issues with compression:

Enable compression for the following resources to reduce their transfer size by 18.3KiB (64% reduction).
Compressing https://ex.co/sitepage.js could save 18.3KiB (64% reduction).

Gzip compression is setup correctly on example.com:

# grep 'gzip_types' /var/www/vhosts/system/example.com/conf/vhost_nginx.conf
gzip_types text/plain text/css application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript image/x-icon image/bmp image/svg+xml;

Cause

According to PageSpeed check, it does not validate https://ex.co/sitepage.js as compressed. example.com/page.html contains a link to a third-party file (located on a different site): https://ex.co/sitepage.js. Gzip compression is not enabled on ex.co site.

Resolution

Use one of the following solutions:

1. Contact ex.co site owners in order to enable gzip compression. If this site is hosted in Plesk, the following article should be followed:

How to enable gzip compression on nginx?

2. Change example.com/page.html page code so that it does not include links to a third-party sources. Instead, all Java files should be stored locally under example.com

Have more questions? Submit a request
Please sign in to leave a comment.