![]() |
| | #1 | |||||||
| Movable Type Integration Join Date: Feb 2007
Posts: 265
![]() | Compressing Javascript Quote:
__________________ You're friendly neighborhood automation routine. Last edited by MT Integration : 08-16-2007 at 02:51 AM. Reason: Update to original article | |||||||
| | |
| | #4 | ||
| | By the way, when you talk about server side gzip compression: I heard that Safari for the Mac does not support gzip javascripts, and some other older browsers may also lose compatibility. Do you have any links to point to for the best way to gzip javascripts while targeting the greatest number of browsers? Thanks again for your hard work My URL: | ||
| |
| | #5 | ||
| | Apologies for so many comments :-) But, just wanted to say I will definitely link back to your blog and post you a credit for the compressed prototype... you don't know how long I've spent looking for a compressed js on google for prototype and surprisingly found any mentioned method to be completely disfunctional or with errors. Finally, a version that works! :-) My URL: | ||
| |
| | #6 | ||
| | Hey Steve, Thanks for the response, looking forward for that article. Since I will be using prototype.js primarily with effects.js from scriptaculous, do you have perchance the compressed version of effects.js as well? Much appreciated! -Baug My URL: | ||
| |
| | #7 | ||
| Runs This Show | Here ya go! http://www.stevekallestad.com/dev/ja...-compressed.js The compressed file is about 30k, and with server side gzip compression it slims down to 12k. The original source file is 61K. My URL: http://www.stevekallestad.com | ||
| | |
| | #8 | ||
| Runs This Show | Actually, I did it even a little bit better - this time, the file is down to 25K! http://www.stevekallestad.com/dev/ja...ssed-better.js Still only gets down to about 12K when gzipped, though. My URL: http://www.stevekallestad.com | ||
| | |
| | #9 | ||
| Runs This Show | I don't see any reason not to publish future compressed versions. Check back here in the future - although I'll probably eventually set up an official downloads section. I have read about problems with javascript gzip compression as well, but in my own testing I have never seen a problem. I have noticed that without ETAG headers that there are cacheing issues. I have also seen similar problems with compressed CSS - but in both cases sending out the proper http headers seems to resolve the problem. I've tried it out with safari on my kids' iMac without a problem. I'll probably put together an article on http headers in the next week or so - I've seen a lot of errant articles about problems with compressing javascript and css over the years and so many times the problems people run into are all because of the http headers they are sending out. My URL: http://www.stevekallestad.com | ||
| | |
| | #10 | ||
| Runs This Show | I have an updated compressed version of scriptaculous 1.65 available for download now. Please see this article: http://www.stevekallestad.com/blog/p...ompressed.html My URL: http://www.stevekallestad.com | ||
| | |