How to disable Right Click on a Web Page - with HTML

There are many ways to prevent the use of Right Click on a Web page, but the most popular one was to use a JavaScript code to disable Right Click. With JavaScript you can either display a custom message like “No Right Clicks Allowed” or just annoy the user by no response.

Any ways I strongly recommend that you do not Disable Right Clicks on your site. One thing is that the user gets a hostile feeling and may not prefer to return. Then, there is no such thing as a complete foolproof way to prevent users from copying or saving your content. In my experience I was successful in copying the content from sites I visited and which used such a foolish technique.

However if you still want to disable right click, here is a simple HTML way to do so

1 . View the HTML source code of your webpage and locate the <body> tag.
2 . Paste this inside the tag
ondragstart=”return false” onselectstart=”return false” onContextMenu=”return false”
Now the code will look something like

<body ondragstart=”return false” onselectstart=”return false” onContextMenu=”return false”>

This is the basic of all right click disabling techniques. Since this is not via JavaScript it can’t be disabled.

Update 1 :

Although you may prevent right clicking by many methods, Firefox will fool you all. Firefox will show the warning message that Right Clicks are disabled but will then show the Right Click menu.

Buy me a cup of hot coffee - help me keep posting all through the night

If you are new here you may want to subscribe to this blogs full feed RSSSubscribe to full feed RSS of this blog
so that you will get the updates automatically to your feed reader.

Tags: , , ,

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

RSS feed | Trackback URI

1 Comment »

Name (required)
E-mail (required - never shown publicly)
URI
Subscribe to comments via email
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> in your comment.

Trackback responses to this post



My Google  Netvibes  My Yahoo!  Windows Live  Bloglines  Newsgator