...

View Full Version : View Javascripts



otnj2ee
10-30-2012, 02:39 AM
If I include a javascript file as

<script language="JavaScript" type="text/javascript" src="js/test.js"></script>

in a jsp page.

When the page is loaded, the users can use the View Page Source function to see the above line of code.

My question: Can the users see the content of the test.js file as indicated above? If so how could they do it?


Thanks

jmrker
10-30-2012, 02:50 AM
If I include a javascript file as

<script language="JavaScript" type="text/javascript" src="js/test.js"></script>

in a jsp page.

When the page is loaded, the users can use the View Page Source function to see the above line of code.

My question: Can the users see the content of the test.js file as indicated above? If so how could they do it?


Thanks

Have you tried it?
Click on the .js file in the <script> tag after viewing the source and see what is displayed.

WolfShade
10-30-2012, 01:37 PM
Or, you can just copy/paste the URL to the .js file in the browser. It will appear in the browser in clear text.

You CANNOT hide static code from users. Period. HTML or JavaScript is viewable either by View Source, or by typing the URL to the .js file into the browser. Obfuscating is a waste of time. The browser must get the code in order to parse it. The user can see it.

Only server-side code is not easily viewed.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum