<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
Looks cool, but safari reports to not support gzip even though it really does.  Here's a URL (comment #2) that describes what's happening:<div><br class="webkit-block-placeholder"></div><div><a href="http://joseph.randomnetworks.com/archives/2006/07/13/compressed-javascript/">http://joseph.randomnetworks.com/archives/2006/07/13/compressed-javascript/</a></div><div><br class="webkit-block-placeholder"></div><div>-Tom</div><div><br><div><br class="webkit-block-placeholder"></div><div><br><div><div>On Jan 17, 2008, at 9:17 PM, Matthew Nuzum wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">It's trivial to write a bit of PHP code that looks at the http accept-encoding header and choose to send either compressed or uncompressed data based on what you find there. However I'm in a special situation where I cannot serve dynamic content based on individual browser settings. I have a caching proxy in front of the app server and for performance reasons we don't send differing content based on browser preferences. <br><br>I've been trying to figure out a way to detect if gzip compression is supported on the client side and then use that information to request either compressed or uncompressed js and css files.<br><br>The difference in file size really is impressive, starting at about 50% decrease in file size for small resources and improving to 70% decrease in file size as the resources get larger. Also, it allows you to use normal, non-packed js files with practically no difference in download size which makes debugging js *so* much easier. (by packing I mean something like <a href="http://dean.edwards.name/packer/">http://dean.edwards.name/packer/</a>)<br><br>I've come up with a solution. It adds about 1.4k to the page weight, but in my use case saves over 20k. I've got a working example but would really appreciate a few extra eyes and any feedback. I've documented my proof of concept here and I'd love to hear your thoughts on it: <a href="http://www.bearfruit.org/blog/2008/01/17/using-gzip-compressed-js-and-css-without-an-app-server">http://www.bearfruit.org/blog/2008/01/17/using-gzip-compressed-js-and-css-without-an-app-server</a><br clear="all"> <br>-- <br>Matthew Nuzum<br>newz2000 on freenode <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Cialug mailing list</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><a href="mailto:Cialug@cialug.org">Cialug@cialug.org</a></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><a href="http://cialug.org/mailman/listinfo/cialug">http://cialug.org/mailman/listinfo/cialug</a></div> </blockquote></div><br></div></div></body></html>