# rebuildable; only one of those copies is the one actually `include`d on a
# given server.
#
-# Forces HTML responses to always revalidate (since a post's URL stays the
-# same across edits/redeploys, so a cached page could otherwise go stale
-# silently) while leaving normal caching behavior for everything else.
+# Forces HTML and Markdown responses to always revalidate (since a post's URL
+# stays the same across edits/redeploys, so a cached copy could otherwise go
+# stale silently) while leaving normal caching behavior for everything else.
+# The .md mirrors are the same posts at equally stable URLs, and they fare
+# worse than HTML when cached: a stale entry pins the response headers too, and
+# a .md has no <meta charset> to fall back on, so a browser holding an old
+# entry keeps rendering it in the wrong encoding until the entry is replaced.
+#
+# The keys are exact matches even though these responses go out as
+# "text/html; charset=utf-8" -- nginx evaluates this map before the charset
+# filter appends the parameter. Verified against the live site; no need to
+# "fix" these into regexes.
map $sent_http_content_type $expires {
default off;
text/html epoch;
+ text/markdown epoch;
}