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

[Outdated Now] 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.

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.

Update 2 :

This trick is now outdated. It won’t work now.

Some related articles you may like :

  1. How to disable access to Drives using Disk Management
  2. How to Disable Autoplay/Autorun
  3. Browser hogging CPU when taking wordpress write post page!
  4. JavaScript in address bar, trick to make images in a web page dance
  5. Virus infection by autoplay, how to prevent it
  6. Why is my template selection page in WordPress showing cryptic CSS
  7. How to prevent access to select drives using Registry
  8. Image aspect ratio correction using GIMP

This entry was posted in Uncategorized and tagged Customize, Disable, HTML, Tips, Tutorial, Web. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

One Trackback

  1. [...] might also be interested in knowing how to disable right clciks using simple HTML tags. If this method is used you can select Page Info from Tools menu on the [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>