0

I'm trying to enable compression for a SPA application that is 99% JS and CSS.

Here is the nginx config that I'm using: (I have commented out some settings while testing, but even if enabled do not improve the situation.)

gzip on;
# gzip_disable "msie6";
# gzip_vary on;
# gzip_proxied any;
gzip_comp_level 6;    
# gzip_http_version 1.1;    
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/vnd.ms-fontobject application/x-font-ttf font/opentype image/svg+xml image/x-icon application/javascript;

The resulting file sizes have increased by a tiny bit.

Here is what the browser says:

enter image description here enter image description here

I can't see what the problem is...

0

The increase you're seeing is actually just the header overhead, not compression somehow working in reverse. In actuality, your content is not being compressed at all.

If the response were compressed, you would see content-encoding: gzip in your response headers.

0

It was the antivirus. ESET was doing stuff. Opened a VM and from there everything was OK.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.