• Resolved arunki

    (@arunki)


    Hi, Guys

    I am about to set the code (browser caching) suggested by Hummingbird in my nginx.conf file. I found out there is already an existing code in the file and i don’t know if i should just copy the new code below this one or if i should delete part of the code and then paste the new one. Someone to give a hand?

    location = /favicon.ico { log_not_found off; access_log off; }
         location = /robots.txt { log_not_found off; access_log off; allow all; }
         location ~* \.(css|gif|ico|jpeg|jpg|js|png)$ {
            expires max;
            log_not_found off;
            }
    
    Code to be pasted:
    
    

    location ~* \.(txt|xml|js)$ {
    expires 8d;
    }

    location ~* \.(css)$ {
    expires 8d;
    }

    location ~* \.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|mp4|m4v|ogg|webm|aac|eot|ttf|otf|woff|svg)$ {
    expires 8d;
    }

    location ~* \.(jpg|jpeg|png|gif|swf|webp)$ {
    expires 8d;
    }`

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘nginx enabling browser caching’ is closed to new replies.