I try to follow google pagespeed tips and use browser caching. To do this, I put the following code in the server block of my nginx.conf file.
location ~* \.(jpg|jpeg|png|gif|ico|css|js)$ { expires 365d; } location ~* \.(pdf)$ { expires 30d; }
It seems to work well, page speed increases my score to 87/100 to 95/100. However, when I click the update button for my site, it no longer downloads css files? Does caching not work?
The error message I get is
Failed to load resource: the server responded with a status of 404 (Not Found)
Here is my whole nginx.conf file
worker_processes 1; events { worker_connections 1024; } http { include /etc/nginx/mime.types; sendfile on; gzip on; gzip_http_version 1.0; gzip_proxied any; gzip_min_length 500; gzip_disable "MSIE [1-6]\."; gzip_types text/plain text/xml text/css text/comma-separated-values text/javascript application/x-javascript application/atom+xml;
source share