From 86df58658691d7be41b29f0ea880defe4f67689d Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Sat, 29 Jan 2022 13:25:42 -0500 Subject: posts/media-shrinkage: add cache-control note --- content/posts/2022-01-28-media-shrinkage.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'content') diff --git a/content/posts/2022-01-28-media-shrinkage.md b/content/posts/2022-01-28-media-shrinkage.md index 81057a1..9d1d9fc 100644 --- a/content/posts/2022-01-28-media-shrinkage.md +++ b/content/posts/2022-01-28-media-shrinkage.md @@ -38,7 +38,9 @@ Recently I made the following site improvements: fallback to [PNG][] ([progressive enhancement][]). 6. Configured [mod\_deflate][mod_deflate] to compress [SVGs][svg] (see note about [BREACH][] below). -7. Enabled [HTTP/2][] for this site (how did miss I this before?). +7. Enabled [HTTP/2][] (how did miss I this before?). +8. Added a [Cache-Control][] header for static style, script, and + image assets. **Note:** Using [HTTP compression][] ([mod\_deflate][mod_deflate], [mod\_brotli][mod_brotli], etc) with [dynamic web pages][] can expose @@ -72,7 +74,7 @@ load in [Chrome][]: * [Debian][]: Add `image/webp webp` to `/etc/mime.types`. **Update (2022-01-29):** Small formatting, grammar, and spelling fixes. -Added [HTTP/2][] note, [BREACH][] warning, and +Added [HTTP/2][] note, [Cache-Control][] note, [BREACH][] warning, and [tdewolff/minify][tdewolff-minify] link. [svg]: https://en.wikipedia.org/wiki/Scalable_Vector_Graphics @@ -135,3 +137,5 @@ Added [HTTP/2][] note, [BREACH][] warning, and "PHP module for Apache" [vhost]: https://httpd.apache.org/docs/2.4/vhosts/ "Apache virtual host" +[cache-control]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control + "Cache-Control HTTP header" -- cgit v1.2.3