I have made use of several web based minifiers that have worked for me in the past. I have just tried minifying a prototype version 1.6.0.1 – I have placed the original here and the minified here.
The error I get from firebug after the js file being minified is this:
missing } after property list
ept': 'text/javascript,text/html,appli...estHeaders=='object'){var extras=this.
I don’t understand why this has not worked. I have minified JQuery and it works. This is the first time I have tried minifying prototype, I mean it should work right, its just removing whitespace and comments!
Thanks all for any helo
the minifier you use consider everything between
/*and*/as comments, but looking at lines 1244 to 1254 (from the original script):the first
/*was inside quotes, it should have left it alone, you should change the*next toept': 'text/javascript,text/html,appliin your code and paste the missing text, so instead of:you should have
Consider changing the minifier you are using to something less buggy.
I minified your script with
yuicompressor, the resulting file is 3K less than the one you have, the minifier you use leave spaces in places they can be omitted. check it here: Prototype JavaScript framework, version 1.6.0.1, minified using yuicompressor