X

Javascript compressing and more

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.
Related Post
Leave a Comment