I have an external JavaScript in my HTML page. Is there a way to disable linking to or viewing this js file?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No, there is not a way to do this. It’s a client-side scripted language…you cannot in any way hide the a script that’s running…not from the people you are probably wanting to hide it from (people who would go after your script are smarter than the average user most likely).
There are a number of tools available to inspect javascript, Chrome’s tools, Firebug, any traffic sniffer, javascript unpackers (though debate-ably packing/minifying makes the code less “out of the box” usable).
You can deter people with the packing/minification, but you cannot prevent them from seeing/figuring out the code.