Hello!
I need help in setting up gzip compression for server side included files.
I have enabled gzip compression in nginx.conf
This is the configuration that I have used
gzip on;
gzip_vary on;
gzip_disable "msie6";
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_min_length 256;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
I also have ssi on at the server block level.
When I check the response headers for SSI files, it does not show content-encoding header. However, when I check the response header for a .css file served from the same server, I get the content-encoding header.
Therefore, I get a "enable text compression" suggestion in Chrome lighthouse for the SSI files.
I have pasted the response headers
1. For the SSI file
alt-svc: clear
cache-control: no-cache
content-type: text/html
date: Wed, 23 Jan 2019 05:03:31 GMT
server: nginx/1.14.0 (Ubuntu)
status: 200
vary: Accept-Encoding
via: 1.1 google
2. For the CSS file
age: 386917
alt-svc: clear
cache-control: max-age=31536000,public, no-transform
content-encoding: gzip
content-length: 30438
content-type: text/css
date: Fri, 18 Jan 2019 16:30:06 GMT
expires: Sat, 18 Jan 2020 16:30:06 GMT
server: nginx/1.14.0 (Ubuntu)
status: 200
vary: Accept-Encoding
via: 1.1 google
Could you please help me solve this?
Thanks for your time.
I need help in setting up gzip compression for server side included files.
I have enabled gzip compression in nginx.conf
This is the configuration that I have used
gzip on;
gzip_vary on;
gzip_disable "msie6";
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_min_length 256;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
I also have ssi on at the server block level.
When I check the response headers for SSI files, it does not show content-encoding header. However, when I check the response header for a .css file served from the same server, I get the content-encoding header.
Therefore, I get a "enable text compression" suggestion in Chrome lighthouse for the SSI files.
I have pasted the response headers
1. For the SSI file
alt-svc: clear
cache-control: no-cache
content-type: text/html
date: Wed, 23 Jan 2019 05:03:31 GMT
server: nginx/1.14.0 (Ubuntu)
status: 200
vary: Accept-Encoding
via: 1.1 google
2. For the CSS file
age: 386917
alt-svc: clear
cache-control: max-age=31536000,public, no-transform
content-encoding: gzip
content-length: 30438
content-type: text/css
date: Fri, 18 Jan 2019 16:30:06 GMT
expires: Sat, 18 Jan 2020 16:30:06 GMT
server: nginx/1.14.0 (Ubuntu)
status: 200
vary: Accept-Encoding
via: 1.1 google
Could you please help me solve this?
Thanks for your time.