Sponsored Ad

Wednesday, 2 October 2013

Disable Right-Click Without JavaScript

Disable Right-Click Without JavaScriptIn 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. 

Related Articles