Hey - Several times I've come across .js files that when I tried to open them they said they were compressed archive or something along those lines and could not be opened. I have a javascript file I would like to lock in such a way. Any ideas? Thanks & Happy Holidays!
you can't lock js file all you can do is obfuscate and make it hard to read or use. There many js obfuscators some of them are open source I use one from saltstorm.net
Packer is a well known one. http://dean.edwards.name/packer/ This uses document.write, its very easy to bypass.
Thanks for all the posts. Very helpful. Anyone know why some .js files say they are compressed archives and can't be opened?
I'm curious whether the compressed js file is decompressed in the browser's cache. It seems to be used for transport across the network.
I was wondering if browsers had built in decoding mechanisms to read compressed/obfuscated text or it was just rendered as the original code once it was rendered into cache. Or does javascript have a built-in decrypting mechanism similar to the way an MD5 hash works.