Hi, After using custom_rhino.jar to compress prototype.js, I found that the keyword ''$super'' used in 1.6 will be replaced and cause some error(AJAX function). Does any one know how to deal with this or what else I can do to compress prototype.js safely? Thanks a lot. Vincent --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Sorry to say, I can''t much help you with custom_rhino.jar compression. But, I do suggest trying JSMin: http://javascript.crockford.com/jsmin.html Javascript version: http://fmarcia.info/jsmin/test.html Haven''t minified prototype myself, but I''ve never heard of JSMin rewriting anything other than whitespace. Hope that helps. - Jon L. On Apr 29, 10:52 am, Vincent Shiu <shiu.vinc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > After using custom_rhino.jar to compress prototype.js, I found that > the keyword ''$super'' used in 1.6 will be replaced and cause some > error(AJAX function). Does any one know how to deal with this or what > else I can do to compress prototype.js safely? > > Thanks a lot. > > Vincent--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Hi Vincent, You are correct the $super var is an issue when variable shrinking prototype. The recent builds of YUI Compressor ignore the $super variable in Prototype and other code. http://developer.yahoo.com/yui/compressor/ You may also use ProtoPack a package of compressed, minified, variable shrunk, base 62 encoded, and gzipped versions of Prototype and Scriptaculous. Also ProtoSafe has a modify.html tool that uses a customized verison of Dean Edwards packer (with support for the $super variable) as well. http://code.google.com/p/protosafe/downloads/list For best compression results you can remove whitespace + variable shrink + gzip. Also the version of JSMin linked to by Jon L has issues with Prototype 1.6. If you use JSMin you want to use this version: http://code.google.com/p/jsmin-php/ The $super variable issue is discussed more here: http://ajax.sys-con.com/read/464826.htm - JDD --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
You can also set your apache server up to use mod_deflate and automatically serve gzipped files: http://httpd.apache.org/docs/2.0/mod/mod_deflate.html Or concat, minify, and gzip: http://www.thinkvitamin.com/features/webapps/serving-javascript-fast --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks for the information, that really helps. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---