0

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)?

Artjom B.
  • 61,146
  • 24
  • 125
  • 222
user1800105
  • 75
  • 1
  • 5

2 Answers2

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