Force browsers to re-validate cache before reuse

Upon new release, NGINX would return 200 OK with new static files.
Otherwise, NGINX would return 304 Not Modified with empty response, and browser continue to reuse cached static files.

(cherry picked from commit 4506a5e4901299dfcb8ba2524e2a6c451fffcf90)
This commit is contained in:
Quan Tran
2023-05-12 16:29:09 +07:00
committed by Dat Vu
parent e0244f38c2
commit 1b79bf8457
+1 -1
View File
@@ -22,7 +22,7 @@ http {
#tcp_nopush on; #tcp_nopush on;
keepalive_timeout 65; keepalive_timeout 65;
expires 86400; add_header Cache-Control "no-cache";
etag on; etag on;
include /etc/nginx/conf.d/*.conf; include /etc/nginx/conf.d/*.conf;