|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| ||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
general - Gzip/deflate based on content type/browser
Is it possible to set mod_deflate or gzip to only deflate javascript and css files if the browser accepts it _and_ the browser is IE7 or above? From what I understand IE6 and below has problems with compressed js (not sure about css).
Yahoo seem to have some system in place for their yui so it does this, but I don't think they're going to share their secret.
__________________
Cooking Forums |
|
#2
|
||||
|
||||
|
You might be able to do this with mod_filter.
__________________
# Jeremy Explain your problem instead of asking how to do what you decided was the solution. |
|
#3
|
||||
|
||||
|
If anyone was interested, this is the solution I found:
Code:
# Netscape 4.x or IE 5.5/6.0 BrowserMatch ^Mozilla/4 no-gzip # IE 5.5 and IE 6.0 have bugs! Ignore them until IE 7.0+ BrowserMatch \bMSIE\s7 !no-gzip # IE 6.0 after SP2 has no gzip bugs! BrowserMatch \bMSIE.*SV !no-gzip # Sometimes Opera pretends to be IE with "Mozila/4.0" BrowserMatch \bOpera !no-gzip AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE text/javascript AddOutputFilterByType DEFLATE application/x-javascript Header append Vary User-Agent In httpd.conf or .htaccess |
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > general - Gzip/deflate based on content type/browser |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|