Reputation: 58810
I'm trying to increase the performance of my site. I got about ~83 right now accordingly Google Page Speed Insight. While it's not the worst, it's not great either. One of the issues is caching, I need to leverage caching and increase the long life of my static assets.
My site is behind Cloudflare. Do I need to apply any settings there?
Upvotes: 1
Views: 1648
Reputation: 58810
add these lines to : /etc/nginx/sites-available/default
# Media: images, icons, video, audio, HTC
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|mp3|wav|ogg|ogv|webm|htc|woff2|woff)$ {
expires 1M;
access_log off;
add_header Cache-Control "public";
}
and service nginx reload
Upvotes: 2