James_43 15 Junior Poster

Hi all,

my understanding was that Nginx doesn't do any caching unless you tell it to. However, for some reason, all my filles are being cached, and so the website doesn't respond to change in css or js files etc.

I thought that the below server{} code would help:

    location ~\.(?:css|js|json)$ {
        access_log off;
        expires modified +90d;
    }

But it hasn't made any difference. I've tried setting expires to -1 and off with no effect.

Does anyone know why this is happening?