• We value your experience with Plesk during 2025
    Plesk strives to perform even better in 2026. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2025.
    Please take this short survey:

    https://survey.webpros.com/

Resolved nginx not gzip all static files?

Azurel

Silver Pleskian
Hello. I have this config in plesk 12.5 with "Serve static files directly by nginx" is enabled and gzipped included with https://kb.plesk.com/en/122628

I see that CSS files are gzipped, but not images and JS files. All comes from "server:nginx". Why are images and JS files not gezipped, but CSS files?

CSS files
Connection:keep-alive
Content-Encoding:gzip
Content-Type:text/css
Date:Tue, 08 Nov 2016 13:49:18 GMT
Last-Modified:Tue, 08 Nov 2016 12:28:59 GMT
Server:nginx
Transfer-Encoding:chunked
Vary:Accept-Encoding

JS files
Accept-Ranges:bytes
Connection:keep-alive
Content-Length:411548
Content-Type:application/javascript
Date:Tue, 08 Nov 2016 13:49:18 GMT
Last-Modified:Mon, 07 Nov 2016 19:11:46 GMT
Server:nginx

Solution

In KB 122628 there is used "application/x-javascript", thats wrong. The official standard is "application/javascript". After changed, javascript is now gezipped.
 
Last edited:
Back
Top