PDA

View Full Version : Does Safari still not support GZIP?




MegaMan1311
Jul 20, 2008, 06:49 PM
I just learned about the great compression called GZIP. I enabled it on my forums, and I have had no issues yet, but I tried to GZIP the javascript files on my site, and it didn't work. Safari doesn't like it very much.

I did some reading and found out that Safari doesn't support GZIP as of 2007. What about now with Safari 3? My site doesn't get hit much with Safari, excluding me, and the users who visit my site with safari keep it updated.

Thanks in advance!
MegaMan1311



Sayer
Jul 20, 2008, 07:26 PM
I think you have to configure the webserver to send the appropriate info so the browser can decode Gzip'd content. If Safari didn't support it, you wouldn't be reading most of the modern internet at all.

Makosuke
Jul 21, 2008, 03:46 PM
Yeah, this is a misconfiguration on your end; the page you're looking at right now is being sent with gzip compression, and I can assure you it displays fine in every version of Safari. Actually, I believe a browser that doesn't support gzip (that is, ancient ones) would identify this in its request header, and a properly configured server would send the content uncompressed.

It sounds like you're maybe trying to compress your JS files before upload, instead of letting the server handle it, maybe? If so, that's the issue--maybe other browsers attempt to decompress on the fly and Safari sticks closer to the spec (and/or MIME type, which may be wrong if you gzipped it manually) so treats it as a file, rather than JS.

MegaMan1311
Jul 22, 2008, 09:53 AM
Ok. I'll take a look at having the server GZIP for me. I was manually GZIPing the files. Thanks.

MegaMan1311
Jul 22, 2008, 03:45 PM
I've enabled GZIPing successfully and I have confirmed that. I ended up using SmartOptimizer to strip and gzip my javascript and css. Thanks.

I have just one issue though... When I take a look at my page load sizes in Safari's Web Inspector, it shows no change in page-load size. Should that happen? If I turn GZIP off, and look at the site, it is the same as it is when it is on.

Also, is 700kb (no refresh) to 500kb (after refresh) too large for my website size?

EDIT: Went over to Firefox (firebug) to test this. Figured out what was wrong. Safari was showing me the total size of the site after the browser had removed the gzip, so everything was at full size.

So, now, my question is if 300 kb being transferred too much?

angelwatt
Jul 22, 2008, 05:27 PM
So, now, my question is if 300 kb being transferred too much?

Is that web site or web page? I'd guess you mean web page. Partly depends on what type of content you're putting up. If it's mostly text, then that's a little high, but if it's a image or video gallery, then it might be reasonable. My home page, which only uses a small amount of layout graphics and the rest is text is 21KB. One of my artwork pages where I have about 15 thumbnails and descriptions the page size is only 100KB. So from that perspective, your size seems kind of large, but really does depend on the content.

MegaMan1311
Jul 22, 2008, 05:44 PM
Its a blog. It uses a decent amount of images for the design, some post images, javascript to make it dynamic, text, and stylesheet. The largest chunk of the page size is due to the images.