How to disable right click?

dotcomking

Newbie
Joined
Jan 30, 2010
Messages
18
Reaction score
1
Hey guys,

I have noticed my content on other websites and want to be able to stop people from doing that. What is the best way?

Thanks!
 
put this before </head>

Code:
<script language=JavaScript>

var message="Right-Click Disabled!";

function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("alert(message);return false")

// --> 
</script>
 
I hate this scripts, also are you sure that people copy your site manually? You should check your traffic sources
 
if someone wants they can read your source anyways doesn't matter if you disable 'rightclick ' or not
 
if someone wants they can read your source anyways doesn't matter if you disable 'rightclick ' or not

+1 Anyone that you can stop from taking your content by disabling right-click is probably not a problem to you anyway.
 
if someone wants they can read your source anyways doesn't matter if you disable 'rightclick ' or not

Agreed...if they know what they're doing and are not noobs.

One other "trick" I've seen recommended is to have a complete page of empty rows before your source. It doesn't affect how your website looks but does give the impression that your source code is blank...well, at least to those who don't have the sense to scroll down!!

You could also try adding a copyscape banner to your site to see if that makes any difference...look here...

Code:
http://www.copyscape.com/banners.php?o=f

Ultimately, if they want your content then there's nothing to stop them reading and then re-typing it...if they're so inclined. All you can do is put obstacles in their way so that it's not worth their while and they move on to another site!!
 
The only way to stop someone from taking your content is to don't publish, the only thing you do is to slow down the person trying to take your content, or you can make a blog with as little useful content as possible that way no one will find your site easily
 
To stop someone else copying your blog content you need to create your blog using flash media or as an image.
 
Last edited:
If it's an image, you are screwed anyways, they can just print screen and jack you without clicking anything. Only other workaround I can think is to put big ugly watermarks on your images, so they are not worth taking.
 
use ioncube html encoder, it's free, no right click allowed and no source code to look into.

Code:
http://www.ioncube.com/html_encoder.php
 
use ioncube html encoder, it's free, no right click allowed and no source code to look into.

Appreciate that the OP has asked for a solution to prevent plagiarism, but wouldn't this suggestion mess up your SEO? I didn't think Google interpreted this code?
 
Add this line in body tag, so it looks like this:
<body oncontextmenu="return false">
 
Appreciate that the OP has asked for a solution to prevent plagiarism, but wouldn't this suggestion mess up your SEO? I didn't think Google interpreted this code?

i use it and the text inside the pages get indexed the same way... i think google can read javascript far better than any human. if your browser can understand it why wouldn't the googlebot?

in fact, after taking a closer look, it indexes very well the pages and reads the content very well also. it even caches one un-encoded version of your page, so for an extra layer of security i would tell you to use Google Webmaster Tools, add your site there, if you didn't already, and tell big G not to cache your pages :D
 
Last edited:
Try this one for WP:

Code:
http://www.thechetan.com/wp-copyprotect/

Many bloggers are facing the problem of content theft. Content theft is a really serious problem, and it must be dealt with. We bloggers write our posts using much effort, and "Copy Cats" simply copy our content without our permission, and without attribution.

That's why I developed a simple, but powerful, plug-in which will protect your digitally-written work on your blogs. This plug-in is based on the technique of "Disabling right-click" and "No text selection" scripts.
This plug-in will

* Disable right click on your blog.
* Disable Text selection too.
 
Try this one for WP:

Code:
http://www.thechetan.com/wp-copyprotect/
Many bloggers are facing the problem of content theft. Content theft is a really serious problem, and it must be dealt with. We bloggers write our posts using much effort, and ?Copy Cats? simply copy our content without our permission, and without attribution.

That?s why I developed a simple, but powerful, plug-in which will protect your digitally-written work on your blogs. This plug-in is based on the technique of ?Disabling right-click? and ?No text selection? scripts.
This plug-in will

* Disable right click on your blog.
* Disable Text selection too.

it's a good sales pitch but like somebody said above the persons who you will stop by disabling right click or disabling text selection are most likely not your problem, because the one's who steal your content will know how to see your source code without needing the context menu.
 
Back
Top