Welcome to WebmasterWorld Guest from 54.166.227.36

Forum Moderators: phranque

Message Too Old, No Replies

Safari and compressed content

Safari gzip deflate compressed

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

5+ Year Member



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)

WebmasterWorld Senior Member lammert is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



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)

5+ Year Member



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)

WebmasterWorld Senior Member lammert is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



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

BrowserMatch Safari gzip-only-text/html


or

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)

5+ Year Member



Thanks - both lines work.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month