I tried a packer(javascriptcompressor.com) to encode the javascript(.js) but the packer is not that much efficient.Can anyone suggest an efficient javascript(.js) encoder? or is there any other way to protect the javasript(.js)?
Asked
Active
Viewed 75 times
0
-
If you mean obfucation, see http://stackoverflow.com/a/194399/384155 – Osiris Apr 22 '13 at 07:32
2 Answers
0
You can compress your javascript(.js)
your own, by using multiline commenting
and code in a single line.
Also read http://yui.github.io/yuicompressor/ and https://developers.google.com/closure/
Can be possible duplicate of How to compress javascript? or How to compress javascript in realtime?

Community
- 1
- 1

Rohan Kumar
- 40,431
- 11
- 76
- 106
0
The most used JS minifier is uglify. In general the packer by dean edwards is actually quite efficient, but has the following drawbacks: a) it adds unpacking runtime overhead to the file and b) after gzip bigger, than all other minifier (uglify, yui compressor or google closure) and c) needs JS to be written strcit otherwise it fails badly.
I would say google closure and uglify are the best out there, but would recommend uglify.

alexander farkas
- 13,754
- 4
- 40
- 41