Sunday, April 15, 2007

JavaScript Crunchers

JavaScript Crunchers

Great care is being taken by enterprises to safeguard thier intellectual properties. They also take greatest of pains in ensuring that the application is fast loading on all types of Internet Pipes. Nevertheless, there is one big open channel. JavaScript. Scripting content goes in plain text and with more amount of text content, they present a significiant load on the Internet pipe. While there are commercial solutions offered to even obfuscate and encrypt, they do present problems for cross browser decrypting and long term maintenance. The relative tradeoff and middle tier solution would be Crunching the JavaScript files.

I would like to share a few JavaScript crunchers over here:

  1. CFoster Javascript Cruncher
  2. Brainjar Cruchinator

We would here review in brief about them and the modus operani adopted therein.

  1. Simple parsing using regular expressions to remove comments
  2. Newlines are removed and hence the entire function now occupies a single line when done a ViewSource.
  3. Unnecessary Whitespaces are removed.

There are a few caveats using the crunchers. Since newlines are removed, scripts if they are not properly delimited by semicolon might break. Hence take a backup of those scripts before running a cruncher on them.

No comments:

[Imported from Blogdrive]Online Virus Scanners

Online Virus Scanners Virus Scanners are no longer difficult to install, tedious to configure. There are easy to use Online Virus Scanne...