Javascript compressing and more

by Sander Gerz March 17, 2009 09:14

Guillermo writes about a website that can compress javascript files. It does a really good job, but when I downloaded the result, it was unreadable.

O="functioresultarkervar conercatch(    windowoundstionif(atTemp uetails r){}eh
 

Would a browser still understand what to do? Well, it certainly did. Just make sure that you need to define the charset for the script:

   1: <script src="[yourscript]" type="text/javascript" 
   2:     charset="ISO-8859-1" ></script>
 
So not only is your javascript compressed, it’s also obfuscated in such a way that others cannot easily see what it’s doing or make modifications for their own purpose.

Currently rated 2.7 by 7 people

  • Currently 2.714286/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen | Modified by Mooglegiant