Home » Blogger Tutorials, Tricks and Hacks » Blogger Programming Tricks / Hacks » Disable Right-Click Without JavaScript

Welcome to our AllBlogTools.com v.3 new version, We are still in beta, please contact us to report an error.

|| View All Tutorials ||

Disable Right-Click Without JavaScript

Disable Right-Click Without JavaScript

1 Star2 Stars3 Stars4 Stars5 Stars

Report Error


In one of our previous posts we featured a tutorial by Vijay Prakash that shows you how to disable the right-click function of a user’s mouse button as long as he’s viewing your web page; this helps in protecting your web content. That method involves using JavaScript but if you prefer something that’s a little lighter on the resource that won’t compromise your blog site’s loading time as much then here’s an alternative method by Gagan Jaiswal that doesn’t use JavaScript.

  • Log in to your Blogger dashboard and head over to the Template section.
  • Click on Edit HTML and then on Proceed.
  • By pressing Ctrl+F, look for the <body> tag in the code.
  • Insert oncontextmenu=”return false;” inside the <body> tag like so:
<body oncontextmenu=”return false;”>
  • And then save your template.

That’s it, you’re done! View your blog and try clicking on the right button of your mouse. If you did it right, the quick context menu shouldn’t pop up anymore.

Liked It ? Please Share


19 Responses | Post A Comment | Subscribe To Comments RSS Feed

  1. Przemek says:

    Hi. i have a question. Does this tweek can work for one div only?

  2. if this is talking about the avoidance of plagiarism, there is still can to using Ctrl + C ,right?

  3. Implemented it but what if someone uses Crl+C ?

  4. Stefano says:

    The correct syntax is oncontextmenu=’return false’>

  5. Rahmat Aziz says:

    Why it doesn’t work in blog (blogspot.com)?

  6. it dint worked for my blog

  7. Nikki says:

    Wow, it works 🙂
    I’ve searched for this for a long time, ’cause I hate this stupid pop up. 😉

  8. phen375 says:

    I dispatched your articles links to all my contacts and they all mate it including me.

  9. I was looking at the latest Q&A in which the board was going off about our political figures and generally the discussion was a demonising of them

  10. dgcnvvcn says:

    I shall never ignore that unforgettable evening, when in a remote town I patiently waited and viewed at a community conference, with three million others not less nervous than myself, for the phrase of deliverance which we have often observed study these days. Prospect mortgages

  11. x says:

    Well, this is actually JavaScript.

Comments will be closed off on this post 365 days (1 year) after it is published. Apologies to this, but it's all about avoiding a growing comment spam problem. See our most recent posts where you can comment here