Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Experts,

I put a Javascript into a JS file,and refered it in a HTML file.

This Javascript includes sensitivity information
such as the
Next page Path and File Name,
some result that will be stored in Array,
and Logic.

I know people can get this JS file information by choosing View Source Code or Download this JS file via Save As page option. so

How do i protect the JS file source?


Any idea will be appreciated!:thumbsup:

Thanks,
Imdadhusen
Posted
Updated 2-Aug-16 16:39pm
v2

I Think it's not possible to restrict JS file from downloading, You can have another alternate option to store sensitive data rather then JS.

See THIS[^] thread which might be useful for you.

Please vote and Accept Answer if it Helped.
 
Share this answer
 
Comments
Sunasara Imdadhusen 3-Nov-10 2:25am    
Ya i understand, but i want to Encrypt JS file, so no body could read it easily.
Give read permission on that folder.
or
you can use following link

Protects JavaScript code from stealing and shrinks size


http://www.javascriptobfuscator.com/
 
Share this answer
 
v3

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