Go Back   Steve Kallestad.com Discussion > Open Discussion > Article Talk


Post New Thread  Reply
 
LinkBack Thread Tools Display Modes
Old 02-07-2007, 06:42 PM   #1
Movable Type Integration
 
Join Date: Feb 2007
Posts: 265
MT Integration is on a distinguished road
Talking Discussion: Compressing Javascript

Compressing Javascript
Quote:
Two utilities that I have found to make the most effective compression factors, combined with the best broad applicability.
Related On SiteRelated External

None

None
__________________
You're friendly neighborhood automation routine.

Last edited by MT Integration : 08-16-2007 at 02:51 AM. Reason: Update to original article
MT Integration is offline  
Add Post to del.icio.usFurl this Post!
Reply With Quote
Old 02-08-2007, 01:24 AM   #2
Baug
 
 
Lightbulb Re: Discussion: Compressing Javascript

Do you have the compressed version of prototype.js? I've been trying to find one for v1.5.0 RC1 (the latest) but can't seem to find any. Please let us know
My URL:
 
Add Post to del.icio.usFurl this Post!
Reply With Quote
Old 02-08-2007, 01:24 AM   #3
Baug
 
 
Lightbulb Re: Discussion: Compressing Javascript

Hello Steve,

Thanks sooo much! Really apprecite your hard work... If you can continue the compression for future versions as well, it would be amazing!

See you,
Baug
My URL:
 
Add Post to del.icio.usFurl this Post!
Reply With Quote
Old 02-08-2007, 01:24 AM   #4
Baug
 
 
Lightbulb Re: Discussion: Compressing Javascript

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:
 
Add Post to del.icio.usFurl this Post!
Reply With Quote
Old 02-08-2007, 01:24 AM   #5
Baug
 
 
Lightbulb Re: Discussion: Compressing Javascript

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:
 
Add Post to del.icio.usFurl this Post!
Reply With Quote
Old 02-08-2007, 01:24 AM   #6
Baug
 
 
Lightbulb Re: Discussion: Compressing Javascript

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:
 
Add Post to del.icio.usFurl this Post!
Reply With Quote
Old 02-08-2007, 01:46 AM   #7
Runs This Show
 
Steve's Avatar
 
Join Date: Dec 2006
Recent Blog: Where to Go From Here
Posts: 183
Steve has disabled reputation
Post Re: Discussion: Compressing Javascript

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
Steve is offline  
Add Post to del.icio.usFurl this Post!
Reply With Quote
Old 02-08-2007, 01:46 AM   #8
Runs This Show
 
Steve's Avatar
 
Join Date: Dec 2006
Recent Blog: Where to Go From Here
Posts: 183
Steve has disabled reputation
Post Re: Discussion: Compressing Javascript

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
Steve is offline  
Add Post to del.icio.usFurl this Post!
Reply With Quote
Old 02-08-2007, 01:46 AM   #9
Runs This Show
 
Steve's Avatar
 
Join Date: Dec 2006
Recent Blog: Where to Go From Here
Posts: 183
Steve has disabled reputation
Post Re: Discussion: Compressing Javascript

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
Steve is offline  
Add Post to del.icio.usFurl this Post!
Reply With Quote
Old 02-08-2007, 01:46 AM   #10
Runs This Show
 
Steve's Avatar
 
Join Date: Dec 2006
Recent Blog: Where to Go From Here
Posts: 183
Steve has disabled reputation
Post Re: Discussion: Compressing Javascript

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
Steve is offline  
Add Post to del.icio.usFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes




All times are GMT -7. The time now is 08:06 AM.