Block js file access from webpage source

I have some js files which should not be viewed by any users accessing my website i.e I don't want the contents of the js files to show up on the page source. The data is important so i don't want users to access at all. Is there any way i can do this ? Or is there any way to encrypt the js file so that I can still access the data inside, but not the users ? Or can I do some safe redirection on clicking the js file ?

Answers


You can't deny access to your JS files but you may consider minifying/obfuscating your JS files to make harder for people to understand.

Check these minifier/obfuscator


Need Your Help

How to use associate arrays to get the id from the checkbox and appropreate value from the text field

php checkbox associative-array

Hi everyone, i'm new to programming. I need to develop a rating system with check boxes and text-fields where user clicks the subjects from the list and add his rating/experience in the text fiel...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.