• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Browser caching suddenly disabled

Franco

Regular Pleskian
Hello,

back several months ago I was able to set "browser caching" on my websites, but recent checks show that it is disabled (cannot say since when).
I looked into this How to enable leverage browser caching for nginx? and just tested a couple of websites to test it, but they remain disabled. i wonder why and how to fix it?

My config is:

CentOS 7.6
Plesk 17.8.11#34
Server: FPM served by nginx. Nothing set in terms of apache proxy, etc.
Location directives as explained in the mentioned article.

I observe the same whether it is plain http or https with https/2 enabled.
My recent changes where an OS upgrade, Plesk upgrade (17.5 to 17.8), TLS 1.2.

Is anyone observing a similar behaviour?

Thanks a lot for any hint on this.
 
I have the same problem suddenly for both FPM served by nginx or apache,

curl -I -c - https://www.example.com/image.png -k

HTTP/1.1 200 OK
Server: nginx
Date: Thu, 27 Dec 2018 18:46:33 GMT
Content-Type: image/png
Content-Length: 13335
Last-Modified: Tue, 18 Dec 2018 23:54:15 GMT
Connection: keep-alive
ETag: "5c1988a7-3417"
X-Powered-By: PleskLin
Accept-Ranges: bytes

I have setup both Apache and Nginx browser chaching according to articles:

How to enable leverage browser caching for nginx?
How to enable leverage browser caching for Apache in Plesk
and read the:
Cache expiration header in additional Nginx directives does not get applied

Experimenting with Nginx only settings, nginx proxying Apache, nothing works, strange is that another domain under same service plan works just fine, looks like a bug, please file it someone, because I can not file bugs, I bought license through reseller.​
 
Hi all, I think I found the problem causing this issue in my case, it was by accident, cache-control: max-age * worked fine only on one of my domains, so spent whole night looking into differences, I found one in Wordpress extension, Security status, View ...

If in Security Status - Hotlink protection (i) (can be reverted) is enabled, cache-control: max-age * header suddenly disappears, once I disable the Hotlink protection, it appears again.

So for me, once I disabled Hotlink protection in WordPress > Security status > View, expiry headers work as desired.

Screenshot from 2018-12-28 16-27-34.png
 
Last edited:
Back
Top