From e807b272df731a42c140123a345bf9877cba627d Mon Sep 17 00:00:00 2001 From: creopard Date: Thu, 18 Apr 2024 15:55:43 +0200 Subject: [PATCH 1/2] Update cache_expiration.conf Added explanatory text in case "ExpiresDefault" is not applied by default. --- h5bp/web_performance/cache_expiration.conf | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/h5bp/web_performance/cache_expiration.conf b/h5bp/web_performance/cache_expiration.conf index 7886c6d8..de21e70f 100644 --- a/h5bp/web_performance/cache_expiration.conf +++ b/h5bp/web_performance/cache_expiration.conf @@ -48,6 +48,13 @@ ExpiresByType application/xml "access" ExpiresByType text/xml "access" +# Keep in mind that the webserver config may have already a preset some file types. +# If so the general rule with "ExpiresDefault" won't be applied for these types. +# This applies especially to image types. If you are not sure or are not able to check the config +# you can test your website with tools such as "Google Lighthouse" or https://pagespeed.web.dev/ +# and look for complaints like "Serve static assets with an efficient cache policy". +# In order to override any preset(s), uncomment the appropriate lines below. + # Generic: WebAssembly # ExpiresByType application/wasm "access plus 1 year" # default From 109ebd169a324c1dac22fa61a4e8c342e0920a4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Colombaro?= Date: Thu, 18 Apr 2024 16:05:46 +0200 Subject: [PATCH 2/2] Update cache_expiration.conf --- h5bp/web_performance/cache_expiration.conf | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/h5bp/web_performance/cache_expiration.conf b/h5bp/web_performance/cache_expiration.conf index de21e70f..ed34414d 100644 --- a/h5bp/web_performance/cache_expiration.conf +++ b/h5bp/web_performance/cache_expiration.conf @@ -7,6 +7,13 @@ # (!) If you don't control versioning with filename-based cache busting, you # should consider lowering the cache times to something like one week. # +# (!) When using `.htaccess` file, the webserver config may have already +# a preset some file types. +# In that case, the general rule with `ExpiresDefault` might not be applied. +# In order to override any presets, uncomment the appropriate "Generic" +# lines below. +# Online checker or validators can help investigating the served cache policy. +# # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Expires # https://httpd.apache.org/docs/current/mod/mod_expires.html @@ -48,13 +55,6 @@ ExpiresByType application/xml "access" ExpiresByType text/xml "access" -# Keep in mind that the webserver config may have already a preset some file types. -# If so the general rule with "ExpiresDefault" won't be applied for these types. -# This applies especially to image types. If you are not sure or are not able to check the config -# you can test your website with tools such as "Google Lighthouse" or https://pagespeed.web.dev/ -# and look for complaints like "Serve static assets with an efficient cache policy". -# In order to override any preset(s), uncomment the appropriate lines below. - # Generic: WebAssembly # ExpiresByType application/wasm "access plus 1 year" # default