I need Apache to serve precompressed fonts (not using deflate).
My .htaccess in the /path_to/fonts/ folder look like
RewriteEngine On
RewriteBase /path_to/fonts/
RewriteCond %{HTTP:Accept-Encoding} .*gzip.*
RewriteRule (.*)\.ttf $1.ttf.gz
AddEncoding x-gzip gz
RemoveType application/x-gzip .gz
Response Headers:
Accept-Ranges bytes
Connection Keep-Alive
Content-Encoding **gzip**
Content-Length **31709**
Content-Type **text/plain**
Date Tue, 06 Mar 2012 18:14:51 GMT
Etag "7200000008e241-7bdd-4ba954a7395a8"
Keep-Alive timeout=5, max=99
Last-Modified Tue, 06 Mar 2012 16:11:08 GMT
Server Apache/2.2.11 (Win32) PHP/5.2.9
Vary Accept-Encoding
The Content Length says 31709, that would be the compressed size, but I'm not able to download it.
Could you give a hint?
font/ttforapplication/x-font-ttf. pre-gzipping seems like a dumb requisite, probably make by people who read somewhere that it would be good for [insert-buzzword-here] :-P. Seeing how much time you have spend trying to figure this thing out. Seems very wasteful. Just my 2 cents. – Gerben Mar 7 '12 at 15:56