View Full Version : Saving the web page from copying

10-13-2005, 06:05 AM
Hi Everyone,

I have some important information on my html page, i dont want the browser to right click and be able to copy the contents of my site...

Thank u

10-13-2005, 08:41 AM
paste inside HEAD tag

<script LANGUAGE="JavaScript1.1">

function right(e) {
if (navigator.appName == 'Netscape' &&
(e.which == 3 || e.which == 2))
return false;
else if (navigator.appName == 'Microsoft Internet Explorer' &&
(event.button == 2 || event.button == 3)) {
alert("Sorry, you do not have permission to right click.");
return false;
return true;

if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (document.layers) window.captureEvents(Event.MOUSEUP);


these tricks (thats what they are) are not fool proof by a long way and are easily defeated if someone wants to

10-13-2005, 01:05 PM
think even with javascripts like that you can still just save the page or there are also free software packages out there that lets you save an entire site with the complete directory structure.

I basically stopped trying to prevent people from viewing or dl pages, I figure if they want it that badly they will get it

10-13-2005, 01:11 PM
what do you have in an HTML page that you are ok with people looking at but not saving????

maybe there is a better way if you explain a bit more

10-13-2005, 02:55 PM
First of all:
The page is already copied to the users computer when they load it.

And most people are doing File->Save as anyways if they want another copy.

Disbaling right clicking is extremely lame, and only pisses users off.

Like when you want to:
rightclick -> add to favorites

disabling right click is something you mostly see on geocities it screams 'amateur'.

ok, enought ranting ;)
if you still want to do it, use davids code, against his advice :)

10-13-2005, 04:26 PM
disabling right click is something you mostly see on geocities it screams 'amateur'.

Great point and is another reason that I quit doing that a long time ago. Not that I ever did it seriously anyway, was just one of those dumb tricks you read about and thought you would see if you could do it type things.

Creative Insanity
10-13-2005, 05:15 PM
Yeah I agree with domedia.. no right click only really pisses people off.. (does me anyway) and not full proof in any browser as I could just view source. Also with FF and all it's extenstions it wouldn't work.

If it is art work you want to protect I suggest enclosing the art work in an applet.