diff --git a/h5bp/location/cross-domain-fonts.conf b/h5bp/location/cross-domain-fonts.conf index e0fa318..3963339 100644 --- a/h5bp/location/cross-domain-fonts.conf +++ b/h5bp/location/cross-domain-fonts.conf @@ -8,5 +8,5 @@ location ~* \.(?:ttf|ttc|otf|eot|woff|woff2)$ { # And https://github.com/h5bp/server-configs/issues/85 # And https://github.com/h5bp/server-configs/issues/86 access_log off; - add_header Cache-Control "max-age=2592000"; + expires 1M; } diff --git a/h5bp/location/expires.conf b/h5bp/location/expires.conf index 6766ef2..3dc41df 100644 --- a/h5bp/location/expires.conf +++ b/h5bp/location/expires.conf @@ -10,36 +10,36 @@ # cache.appcache, your document html and data location ~* \.(?:manifest|appcache|html?|xml|json)$ { - add_header Cache-Control "max-age=0"; + expires 0; } # Feed location ~* \.(?:rss|atom)$ { - add_header Cache-Control "max-age=3600"; + expires 1h; } # Media: images, icons, video, audio, HTC location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|mp4|ogg|ogv|webm|htc)$ { access_log off; - add_header Cache-Control "max-age=2592000"; + expires 1M; } # Media: svgz files are already compressed. location ~* \.svgz$ { access_log off; gzip off; - add_header Cache-Control "max-age=2592000"; + expires 1M; } # CSS and Javascript location ~* \.(?:css|js)$ { - add_header Cache-Control "max-age=31536000"; + expires 1y; access_log off; } # WebFonts # If you are NOT using cross-domain-fonts.conf, uncomment the following directive # location ~* \.(?:ttf|ttc|otf|eot|woff|woff2)$ { -# add_header Cache-Control "max-age=2592000"; +# expires 1M; # access_log off; # }