From 4f4c79b0fd9e7fb10c1059c90b581dfc4f35fdac Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Mon, 27 Apr 2009 23:56:39 +0000 Subject: [PATCH] apache config to compress html output if possible Enable mod-deflate to bring down all pages to under 30kB for clients accepting gzip compression (which should be most nowadays). Do not bother with crappy browsers maladvertising their abilities, since we're mostly only supporting (modern) standards-compliant behaviour. Savings in bandwidth and load time are very significant: digraphs 159522 -> 27734 (17%) - saves nearly 20s on 56k! vim 107160 -> 13800 (13%) unicode 64588 -> 8418 (13%) charset 58682 -> 8269 (14%) nethack 13428 -> 3396 (25%) index 1486 -> 828 (56%) Not compressing stylesheets, because even for base.css this would only save 8322 bytes, at the risk of browsers being unkind. Maybe later. --- .htaccess | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.htaccess b/.htaccess index 24ee14d..bd6e1a7 100644 --- a/.htaccess +++ b/.htaccess @@ -10,3 +10,6 @@ RewriteRule ^(digraphs)\.ex(/.*)?$ $1.vim$2 RewriteCond %{REQUEST_FILENAME}.plp -f RewriteRule ^/*([^/]+)(.*) $1.plp$2 +# compress html output if accepted by client +AddOutputFilterByType DEFLATE text/html + -- 2.30.0