homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Hardware and OS Related Technologies / Website Technology Issues
Forum Library, Charter, Moderators: phranque

Website Technology Issues Forum

Safari and compressed content
Safari gzip deflate compressed

 8:33 am on Apr 13, 2010 (gmt 0)

I'm having a problem with a clients website. They're running Apache 2.0.61. When I enable mod_deflate Safari (4.0.4) struggles to display the page correctly. Its as if its missing out the Ajax code. When I turn off compression for Safari it works fine. All other browsers are fine.

Anyone come across this before?



 8:38 am on Apr 13, 2010 (gmt 0)

There are some older browsers which had problems accepting compressed content if it wasn't HTML. Compressing CSS or JavaScript files caused problems on these browsers. Do you compress all files, or only the HTML pages?


 8:52 am on Apr 13, 2010 (gmt 0)

We're using mod_deflate to compress everything except images:

Here's the apache configuration:

SetOutputFilter DEFLATE

BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip dont-vary
Header append Vary User-Agent env=!dont-vary


 8:06 pm on Apr 13, 2010 (gmt 0)

The easiest way you could do is to add one of the two following lines:

BrowserMatch Safari gzip-only-text/html


BrowserMatch Safari no-gzip

and then restart the httpd server. If the first line works, it is some problem with the compression of JavaScript or CSS files. If only the second line works Safari chokes on the plain HTML files. You should know that this expression simply searches for the string "Safari" in the browser User Agent string. Google Chrome also has "Safari" in the User Agent line and compression will therefore also be disabled in that browser.


 11:55 am on Apr 14, 2010 (gmt 0)

Thanks - both lines work.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Hardware and OS Related Technologies / Website Technology Issues
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved