PDA

View Full Version : stop script view



iain
08-31-2001, 11:53 AM
i have certain html pages on my site i would like to stop 'prying eyes' from viewing - i have a 'no right click' script but is there a way of stoping people from selecting view-source?

ggs
08-31-2001, 12:09 PM
iain - don't.

it's annoying and pointless...

as long as a browser can download the source and execute it, people can download the souce and view it.

in fact, all they need to do is disable javascript to make it easy.

an example page:
www.mikeisgod.com

information wants to be free! or something like that...

as soon as you choose to serve up a page of HTML to the general public, they get to see it all. not only the end result, but the source it is constructed from...

iain
08-31-2001, 12:30 PM
the page is there for them to see, but i have the right to protect the source. my point being i am planning some advanced tools that i have not yet seen before on the net and i dont want people to be able to just lift the code.

ggs
08-31-2001, 12:36 PM
please, elaborate.

you have to realize that a GET command returns the source code. the browser, depending on how it is set up, may or may not run the javascript that protects the "source". when you serve up a page to the general public, you serve up the source.

and I how does this new technology work? what does it do?

Fordy
08-31-2001, 12:48 PM
I suppose the way to do it is to store the data & methods in somewhere different from the page you are publishing. And have something produce the page "on the fly".

There are a few ways of doing this. With servlets & jsp (yeah I know ive mentioned it too much on this board - but its the subject that I am trying to learn at the mo), you can process data privately and send only what you wish to the viewer. So if the casual browser requests the full meaning of "dll" via your CASE util, he will get a HTML doc with only that answer, not the whole catalogue of answers embedded into the doc as with the javascript method you are currently using. The query is being executed remotely, not on the users PC.

There are loads of alternatives to the servlets (some more practical at the moment because its not easy to get a free host for servlets), but as I dont know javascript, I cant suggest a solution via that method.

ggs
08-31-2001, 12:52 PM
CGI, then.

no-one
08-31-2001, 12:52 PM
Copyright it... the source Any HTML or whatevr you view can be aquired to various means even if you disable the view source.

Copyright unfortunatly is your only protection. it its not all that great of one...