P
P
Puma Thailand2014-11-13 01:24:54
Nginx
Puma Thailand, 2014-11-13 01:24:54

How to make nginx compress static files with get parameters?

Actually nginx perfectly compresses all js and css files, but if there is a get parameter in the file, for example mysite.com/my.js?v73. Then he does not compress such files, how can he make them compress?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
O
Oleg Batishchev, 2014-11-18
@z0rg

Maybe the mime type of files with versions is different? Then add to gzip_types
And also change to every min. http version (gzip_http_version 1.0)

M
marifa, 2014-11-25
@marifa

Puma, off topic, but is it possible to get an answer from you on another question, I wrote you an email: [email protected]

S
Sergey, 2014-12-09
@bondbig

More or less like this:

gzip				on;
gzip_proxied			any;
gzip_static			on;
gzip_http_version		1.0;
gzip_types			application/x-javascript text/css;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question