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.

5 thoughts on “How to disable Right Click on a Web Page – with HTML”

  1. I think everything said was very logical. But, think on this, what if you wrote a catchier title?
    I am not suggesting your information isn’t solid., but suppose you added something to maybe get a
    person’s attention? I mean How to disable right click menu on web pages.Simple Informations is
    a little vanilla. You could glance at Yahoo’s home page and note how they write
    news titles to get viewers to open the links. You might add a video or a related pic
    or two to grab people interested about what you’ve got to
    say. In my opinion, it would make your blog a little bit more interesting.

  2. Nice post. I learn something new and challenging on
    blogs I stumbleupon everyday. It will always be useful to
    read through articles from other authors and practice something from their websites.

  3. Fantastic beat ! I would like to apprentice while you amend your site, how can i subscribe for a blog website?
    The account helped me a acceptable deal. I had been a little bit acquainted of
    this your broadcast provided bright clear idea

Leave a Reply

Your email address will not be published. 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=""> <s> <strike> <strong>