mod_deflate twiking

This is a discussion on mod_deflate twiking within the Apache Web Server forums, part of the Web Server and Related Forums category; Hello, I'm looking for an optimal and cross browser compatible configuration for various MIME types in mod_deflate. To begin ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-11-2008
Lea GRIS
 
Posts: n/a
Default mod_deflate twiking

Hello,

I'm looking for an optimal and cross browser compatible configuration
for various MIME types in mod_deflate.

To begin with, I already put in place a dedicated MIME rewriting rule
for XHTML to be sent as "test/html" or "application/xhtml+xml" depending
on the Accept header.

This rule does a nice job so fahr:

#Serve xhtml pages as text/html to those that can't do application/xhtml+xml

RewriteEngine On
RewriteBase /

# Http Accept header does not equal "application/xhtml+xml"
RewriteCond %{HTTP_ACCEPT} !application/xhtml\+xml

# Http Accept header does equal "text/html" OR "*/*"
RewriteCond %{HTTP_ACCEPT} (text/html|\*/\*)

# Requested filename is anything ending in .xhtml
RewriteCond %{REQUEST_FILENAME} .*\.xhtml

# Match any url. - is used for no substitution. Set mime-type to
text/html. L is for last. I.e. stop processing rules
RewriteRule ^.*$ - "[T=text/html,L]"


Now, regarding mod_deflate, I run this configuration:

<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml
application/xhtml+xml application/x-javascript text/css
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png|exe|zip|pdf)$ no-gzip
dont-vary
BrowserMatch "MSIE" gzip-only-text/html
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch "MSIE" brokenvary=1
BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1
BrowserMatch "Opera" !brokenvary
SetEnvIf brokenvary 1 dont-vary
Header append Vary User-Agent env=!dont-vary
</IfModule>

This setup work well with Firefox, but documents sent to Internet
Explorer 6 and 7 do not get compressed. Is it related to the MIME
rewrite rule (above) for "application/xhtml+xml" MIME types ?
How to set up mod_deflate to let it compress all compressable documents
in a compatible way for various current browsers, _including for XHTML
documents_ ?

Regards,

--
Léa Gris
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:59 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0