Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

nginx enabling browser caching

$
0
0

Replies: 0

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 all articles
Browse latest Browse all 59525

Trending Articles