1

I know it's not possible to encrypt JS code, but how can I make it difficult to understand for everyone, like jquery.min.js?

José M. Pérez
  • 3,199
  • 22
  • 37
irmorteza
  • 1,576
  • 3
  • 19
  • 32

5 Answers5

4

There are multiple terms for this:

That last is slightly different from the first four, because it will apply actual compilation algorithms and heuristics to your code. For instannce, if you have a short function, the Closure compiler might inline it (provided doing so doesn't have side-effects).

T.J. Crowder
  • 1,031,962
  • 187
  • 1,923
  • 1,875
2

You can do this at below link.

http://www.javascriptobfuscator.com/Default.aspx

Dipesh Parmar
  • 27,090
  • 8
  • 61
  • 90
1

That specific file is 'minified'. This makes variable names smaller and removes whitespace to reduce the bytes required to store the file on the server, and make it quicker to download. There is an online tool you can use to do this: JSCompress

Note that this is not 'difficult to understand' to anyone who knows javascript. There may be obfuscating tools, but they are largely pointless for javascript. As with anything, if you aren't prepared to have someone see what you've created, don't put it online.

Rory McCrossan
  • 331,213
  • 40
  • 305
  • 339
1

use http://javascriptcompressor.com/

Compress and obfuscate Javascript code online completely free using this compressor.

Goutam Pal
  • 1,763
  • 1
  • 10
  • 14
0

Use a code minifier like: http://jscompress.com/

There are many out there that do different kinds of obfuscation and minifications. I myself use minify for nodejs - https://npmjs.org/package/minify

m.e.conroy
  • 3,508
  • 25
  • 27