From f8b7e0a91f03030f490cdab5edcd44d0a99c2d6c Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Sun, 19 Oct 2025 10:58:17 +0100 Subject: [PATCH] Add stylesheet to plain text files in .htaccess It turns out that Firefox (version 140 at least) will happily use an HTTP Link header for a CSS stylesheet on a plain text file. It works a bit weirdly because it applies the stylesheet to the HTML conversion of the file, but that actually means that the existing bedstead.css works pretty well. This doesn't work on Chromium, but that's no worse than what we've already got. --- .htaccess | 1 + 1 file changed, 1 insertion(+) diff --git a/.htaccess b/.htaccess index d2a504d..6ff3a55 100644 --- a/.htaccess +++ b/.htaccess @@ -3,6 +3,7 @@ AddType application/xhtml+xml;charset=UTF-8 .xhtml AddType font/otf;outlines=CFF .otf ForceType text/plain + Header add Link "; rel=stylesheet type=\"text/css\"" AddOutputFilterByType DEFLATE application/xhtml+xml text/css font/otf \ application/javascript application/wasm \ -- 2.30.2