Disable Mouse Right Click, Text Selection and Keyboard Shortcut Keys

If you like to protect your copyrighted content here you have few ways to prevent your content from copying your web page. In this article, we show you how to stop content-stealing from your website. Here there is no way to simply stop someone from stealing your images, you can do it harder. To avoid this you need to disable right-clicking that is one way you can use to stop normal theft.

For stopping the content copy of your website you can do three things, First disable mouse right-click, the second one is text selection for your webpage and the third one you can disable keyboard shortcut keys. The below code will help to protect your content from the stealing.

Note: Before doing this you required to include the jQuery library.

Disable Mouse Right Click, Copy, Cut and Paste.

Using the following code you can disable the mouse right-click, copy, cut and paste for the whole body or particular id either class.

Disable Mouse Right Click
Disable Copy Cut & Paste
Disable Mouse Right Click, Copy, Cut & Paste

Disable Text Selection

Text selection avoids the selection of content from the user, this is one of the ways to prevent your website content from copying the text.

Disable Text Selection Using CSS
Disable Text Selection Using JavaScript
Disable Text Selection Using jQuery

Disable Keyboard Shortcut Keys

Keyboard Shortcut Keys are another way to get your webpage content. Using F12 and Ctrl+Shift+I is one of the ways to take your contents from your webpage. So the below code will help to disable those keypresses when the user tries to open.

Preview & Download

Was this article helpful?

Yes No
×

How can we improve it?

×

We appreciate your helpul feedback!

Your answer will be used to improve our content. The more feedback you give us, the better our pages can be.

Follow us on social media:

Facebook Pinterest

Mraj

Creative Designer & Developer specialist by the spirit and a loving blogger by thoughts.

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top

DON’T MISS ANY UPDATE

Get notified about the next update

Pin It on Pinterest