Hiding Javascript - How can you hide a .js file from a browser?
I am testing out some Javascript on my page. Currently the page that is running the script is
http://www.the-mouth.com/tag.html
while the actual Javascript resides at
http://www.the-mouth.com/quicka.js
The problem is, if someone types in the above URL into their browser (at least in Netscape) they can see the script I have
used. Is there any way I can hide this script? I have tried changing file property settings (i.e. the chmod stuff) but it doesn't seem to do any good.
Can anyone help?
Thanks
Paul Hancox
http://www.the-mouth.com/
PJ posted this at 04:01 — 6th October 1999.
They have: 76 posts
Joined: Apr 1999
There is no way to hide a JS file since it's a client side script.
Not only can they see it if they type in that URL. They can also see it if they do a search on their hard drive for *.js .
If you have the capability try doing it server side with ASP or CGI using include files or something.
Later,
PJ
John Pollock posted this at 16:09 — 6th October 1999.
He has: 628 posts
Joined: Mar 1999
I'm not absolutely sure, but I'm leaning toward no... though someone else here may know a way to do it I haven't seen just yet.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.