diff --git a/nginx.conf b/nginx.conf index 9de0819..28a0be7 100644 --- a/nginx.conf +++ b/nginx.conf @@ -10,15 +10,10 @@ server { gzip_min_length 1024; gzip_types text/plain text/css application/javascript image/svg+xml application/json; - # Long cache for static assets (images, video, fonts, css/js) - location ~* \.(?:css|js|jpg|jpeg|png|webp|gif|ico|svg|mp4|woff2?)$ { - expires 7d; - add_header Cache-Control "public"; - access_log off; - } - - # Serve files directly; .html pages resolve by their own URL + # Always revalidate with the server (cheap 304s via ETag) so new deploys show up + # immediately instead of being stuck behind a long browser cache. location / { try_files $uri $uri/ =404; + add_header Cache-Control "no-cache"; } }