I'm using a minimal Ubuntu 16.04 and I moved Apache to Nginx 2 days ago. I run a minimal Wordpress site (4 plugins, no customization).
I’m sorry if it’s out of the scope, I'm not sure if it's a bug in the current release and suggesting this with much caution. Please give me a graceful insight over this because this is quite surprising and frustrating in these 2 days.
------------------------------------------------------------
location ~* \.(jpg|jpeg|png|gif|ico|css|js)$ {
expires 365d;
}
location ~* \.(pdf)$ {
expires 30d;
}
------------------------------------------------------------
I’ve pasted the above code inside the server block in the default.conf file of Nginx. I then executed systemctl restart nginx.service.
Yet when running GPI test I still get “Leverage browser caching” for many jpg files but “jpg” is already included in the directive.
I thought it WordPress (Autoptimize) related but it doesn’t seem so as Autoptimize doesn’t deal with images.
All documentation I found, so far, deals with what I already tried. Any ideas? Maybe most doc is outdated? Maybe that’s a bug in the current release of Nginx?
Site URL in GPI test: https://developers.google.com/speed/pagespeed/insights/?url=http%3A%2F%2Fcontfix.co.il%2F
Edited 1 time(s). Last edit at 08/13/2017 03:36PM by benqzq.