PDA

View Full Version : Ext JS Compression



moschel
22 Feb 2008, 3:57 AM
We

J.C. Bize
22 Feb 2008, 5:05 AM
Sounds interesting, thanks for the heads up.

Cheers,
JC

gkassyou
22 Feb 2008, 7:34 AM
I'm using jsminify to minify the code on the server side but would also like to obfuscate. Anyone have a javascript script that obfuscates.

Thx

willgillen
22 Feb 2008, 7:42 AM
I've seen this,but haven't tried it yet:
http://dean.edwards.name/packer/
(tip: for a type of Obfuscation, use the tick-box "base64 encode", and see the results)

pedrosimonetti
22 Feb 2008, 8:48 AM
I've seen this,but haven't tried it yet:
http://dean.edwards.name/packer/
(tip: for a type of Obfuscation, use the tick-box "base64 encode", and see the results)

Yes, this is the tool you're looking for. It compress and obfuscate JS code.

Just a small hint. Packer has some restriction about the code formatting (it requires semi-colons at the end of function declarations). To avoid these problems, the best to do is first minify the code using another tool (YUI Compressor is highly recommended), and after that, runs the code at Packer.

The YUI Compressor automatically puts semi-colons at the end of function declararions (I guess other compression tools do the same). But YUI Compressor is recommended because it gives the best compression results when used in conjunction with Packer, as you can see here:

http://www.julienlecomte.net/blog/2007/08/13/

regards,

Pedro Simonetti Garcia.

gkassyou
22 Feb 2008, 10:30 AM
Since we are generating the javascript from the server app, we also need to obfuscate on the server. So we need a simple obfuscation script. The packer scripts are too performance intensive. I guess we just need the obfuscation portion of it but it's too complicated to strip out.

pedrosimonetti
22 Feb 2008, 3:25 PM
Packer is also available in PHP, PERL and .NET. I hope this helps.

http://dean.edwards.name/download/#packer

moschel
9 Mar 2008, 2:40 AM
Include (http://javascriptmvc.com/learningcenter/include/index.html) also works with Packer. It loads any scripts that are included in your app, puts them in one file, and compresses that file with Packer.