Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running javascript at server 1

Status
Not open for further replies.

edeaux

Programmer
Mar 7, 2003
16
0
0
PH
Is there a way to run javascripts at server just like asp that ables you to run it at server? I want my javascript not to be shown in public (by means of view source in browsers). Thanks.
 
There is no way to protect client-side JavaScript. If you want ANY JavaScript to run on the client for client-side functionality, then you'll have to be resigned to that fact. Of course there are ways to obfuscate the code, and putting a link to the source file stops the code from appearing inline in the actual source of the page, but the JavaScript is available via a temp folder anyway, since it has to be on the client to run (this folder would be the temporary internet files folder in Windows).

Running JavaScript on the server is just that -- running it on the server. You'd need to write to an API that accepts JavaScript as a language for that API, like ASP, which you mentioned. This server-side code has nothing to do with any client-side JavaScript, though.

-Tek
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top