Add filename based cache busting

This commit is contained in:
Alessandro Vendruscolo 2012-07-21 00:27:27 +02:00
parent 804f8c4e54
commit 48a1cd5a7c
1 changed files with 10 additions and 0 deletions

View File

@ -119,6 +119,16 @@ http {
# Custom 404 page
error_page 404 /404.html;
# Built-in filename-based cache busting
# https://github.com/h5bp/html5-boilerplate/blob/5370479476dceae7cc3ea105946536d6bc0ee468/.htaccess#L403
# This will route all requests for /css/style.20120716.css to /css/style.css
# Read also this: github.com/h5bp/html5-boilerplate/wiki/cachebusting
# This is disabled by default, because it'd be better if you use the build
# script to manage the file names.
# location ~* (.+)\.(\d+)\.(js|css|png|jpg|jpeg|gif)$ {
# try_files $uri $1.$3;
# }
# No default expire rule. This config mirrors that of apache as outlined in the
# html5-boilerplate .htaccess file. However, nginx applies rules by location, the apache rules
# are defined by type. A concequence of this difference is that if you use no file extension in