Skip to content

Instantly share code, notes, and snippets.

@reliq
Last active May 8, 2018 20:55
Show Gist options
  • Save reliq/9b9fa23dab14c48a87d5a28dd330f7cf to your computer and use it in GitHub Desktop.
Save reliq/9b9fa23dab14c48a87d5a28dd330f7cf to your computer and use it in GitHub Desktop.
Leverage browser cache by adding this location directive inside server directives.
#browser caching of static assets
location ~* \.(jpg|jpeg|png|gif|ico|css|js|woff|woff2|svg|svgz|mp4|ogg|ogv|webm|htc)$ {
expires 1y;
access_log off;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment