Link to home
Start Free TrialLog in
Avatar of scorp010699
scorp010699

asked on

denying source code

How do you make so that the surfer cannot acccess your source code and steal your graphics by right clicking on your webpage?
Avatar of MasseyM
MasseyM

This is a terrible thing, but it cannot be done.  
Use a java applet that displays your text and pics.
For pics, you can use plug-in formats to make it harder.
But I guess that is too complicated for what you want, so let me explain to you how the Web works. If you surf to a page, your browser requests the page's source (the HTML) from a server. Then it displays an interpretation of the source. This means the user can always see the source, because its client (the browser) has to download it before it can do anything.
Avatar of scorp010699

ASKER

their has to be a way cause i seen it in some cat's webpage. whenever i right clicked i got a popup window that said something to the effect "No you can't steal my code or graphics"
Avatar of ozo
So, all you want is a popup window with a message that tells people who have Javascript enabled not to steal your graphics?
no. i remember cruising along the internet and i found a site. I was actually plannin on stealin the email gif but when i right clicked anywhere inside the ie instance to recieve the list with all them options i got a popup box that said "No you can't steal my ****" and no menu ever appeared.
u can do one thing that is u can make the browser not see ur  scource code .there is an option in javascript.
<script language="javascript">
<!-----hide these from other browers..
ur program....
stop hiding--->
</script>
fundoo: that's not hiding, that's making it a comment so that older browsers don't give an error when they parse the script. Source code is still fully visible.

scorp: do you remember where you saw it? Are you sure it was not an applet or ActiveX control?
You can write a script which traces the right clicks. However, it will only work in NN4/IE4. Here are a few work-arounds:
* Use telnet (or write a Perl script or something like that) to get the page source. Look up the images' URLs and go there.
* Use NN4, press Ctrl-U to get the source. Do as above
* Use IE4, press Alt-V-C to get the source. Do as above
* Use NN4, press Ctrl-I. You'll get a list with all the images at the page. Just click and download.
* To be continued...

In other words, you can hide it from the newbies. The more experienced users will find a way around.

Martin
This comes from Microsoft themselves.

You cannot overwrite Windows context-sensitive menu (meaning right clicking will always bring the context menu up).  This will be changed in the upcoming IE5.  In IE5 you can do this.

If you have the URL for that site, please give it out.  I am more than interested on how they are doing it.  My guess for now is that it's an Active X control.

I'd agree with MasseyM rejected answer and Martin's previous post.  You can't.  Show me a page that is done purely in HTML and Javascript and I'll show you the code behind them.

hey fundoo, seems i'm going to have to except your answer but w/ one Q. What goes where you put "ur program" do you mean the url ?
fundoo's answer has NOTHING to do with hiding source code. It is just there so that browsers that do not support javascript wil not display it in the window.  
MasseyM: don't waste your time on this anymore, mate. We're going to file this one in the "amusing ridiculous answers" section:-)
ASKER CERTIFIED SOLUTION
Avatar of y2kwacko
y2kwacko

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial