Thread: stop script view

  1. #1
    Hamster without a wheel iain's Avatar
    Join Date
    Aug 2001
    Posts
    1,385

    stop script view

    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?
    Monday - what a way to spend a seventh of your life

  2. #2
    C > C++ duders ggs's Avatar
    Join Date
    Aug 2001
    Posts
    435
    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...
    .sect signature

  3. #3
    Hamster without a wheel iain's Avatar
    Join Date
    Aug 2001
    Posts
    1,385
    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.
    Monday - what a way to spend a seventh of your life

  4. #4
    C > C++ duders ggs's Avatar
    Join Date
    Aug 2001
    Posts
    435
    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?
    .sect signature

  5. #5
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    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.

  6. #6
    C > C++ duders ggs's Avatar
    Join Date
    Aug 2001
    Posts
    435
    CGI, then.
    .sect signature

  7. #7
    Has a Masters in B.S.
    Join Date
    Aug 2001
    Posts
    2,263
    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...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Script in games
    By Shakti in forum Game Programming
    Replies: 7
    Last Post: 09-27-2006, 12:27 AM
  2. In a game Engine...
    By Shamino in forum Game Programming
    Replies: 28
    Last Post: 02-19-2006, 11:30 AM
  3. Passing arguments to script.....
    By suwie in forum C Programming
    Replies: 5
    Last Post: 09-25-2004, 11:10 PM
  4. Game structure, any thoughts?
    By Vorok in forum Game Programming
    Replies: 2
    Last Post: 06-07-2003, 01:47 PM
  5. Determining Active View :: MFC
    By kuphryn in forum Windows Programming
    Replies: 0
    Last Post: 04-25-2002, 07:34 PM