jquery - Prevent Unauthorized access to JavaScript files -


is there way prevent unauthorized access javascript files.

<script src="js/myscript.js" type="text/javascript"> 

users should not able view myscript.js file.

i know ,is possible ? if possible please give me idea. :)

thank you..

it's not possible.

the file must accessible work in pages. server has no way determine if request script tag, directly typing browser window, etc.

you can minify file make less human-readable. can obfuscate it, although have performance impact on website. these reversible, , wants reverse engineer code still can.

as though, should prepared anyone see anything put online.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -