Click here to Skip to main content
15,896,730 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
I would like to know whether it is possible to protect the javascript files? I do not want to let the user to open and see the js files from the browser
Posted

No, not really.

The best you can do is minimise them. This reduces as much of the white space as possible and makes them quite difficult to read.
 
Share this answer
 
You cannot hide the code but you can OBFUSCATE the code,
which will make it very difficult for a human to read.

[Warning: A dedicated and skilled programmer can still decode the OBFUSCATED code,
but it is an extremely tedious task and is generally avoided by all.]

Here are some link to pages that can obfuscate your code.
For best results use a combination of them.

http://dean.edwards.name/packer/[^]
http://www.javascriptobfuscator.com/[^]
http://refresh-sf.com/yui/[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900