• Resolved anrsml

    (@anrsml)


    Hello
    I am using Nginx server that require me to install this file

    location ~* \.(css|js)$ { expires 365d; }
    location ~* \.(jpg|jpeg|png|gif|ico|svg|webp)$ { expires 180d; }
    location ~* \.(ogg|mp4|mpeg|avi|mkv|webm|mp3)$ { expires 30d; }
    location ~* \.(ttf|otf|woff|woff2)$ { expires 120d; }
    location ~* \.(pdf)$ { expires 30d; }
    location ~* \.(json)$ { expires -1; }
    location ~* \.(xml)$ { expires -1; }

    My question is where and which line should I install the code.

    Regards
    Anuar

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Contributor Salvatore Fresta

    (@salvatorefresta)

    Hi @anrsml ,
    as for all Nginx servers, you must add these line into the server block config file of your domain, usually into /etc/nginx/sites-enabled/

    Regards

Viewing 1 replies (of 1 total)
  • The topic ‘Where to add Browser caching rules’ is closed to new replies.