Welcome to WebmasterWorld Guest from 107.22.87.205

Forum Moderators: open

Message Too Old, No Replies

Hiding a .JS file

     
2:56 pm on Dec 13, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Is it possible to hide a .JS file or at least prevent it from being downloaded when a page is saved?

-s-

3:03 pm on Dec 13, 2002 (gmt 0)

10+ Year Member



There will probably not be a safe way, because the file will have to be transferred to the users computer to be executed.

You could test if the request for the .js file has a referrer from a legitimate file, and deny it otherwise, but it is not foolproof. Some browsers and proxies doesn't send the referrer header, and it can be faked.

So, something can be done, but nothing that is perfectly safe.

René

3:09 pm on Dec 13, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you really want to protect the code, I would put it in the page and encrypt the whole page,

Still not 100% foolproof - and no SE friendly.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month