Answer the question
In order to leave comments, you need to log in
How to change max-age in cache-control?
Given:
+ Vesta CP
+ Nginx server
+ headers_module (shared) - checked via httpd -t -D DUMP_MODULES command
What you need:
Change max-age or even disable browser caching for one / several js files.
What I tried:
1) inserted into nginx.conf
server {
location ~* \.(?:css|js|gif|jpe?g|png)$ {
add_header Cache-Control "max-age=86400, public";
}
}
Header set Cache-Control "max-age=86400, public"
Header set Cache-Control "max-age=86400, public"
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question