Skip to content Skip to sidebar Skip to footer

Disable Right Click And Copy Paste Etc .. From My Web Page

First of all thanks in advance.. I want to disable view page source, copy and paste image etc .. in my web site. How can I do it? I know php and javascript.

Solution 1:

There is no perfect way to do this.

You can cancel right mouse events with Javascript, but what if I disable Javascript?

Plus I can always do CTRL+U in Firefox to view the source.

And since the browser has to parse the HTML / Javascript in the end you can always see it in a debugger like Firefox.

Let go of the idea. It's impossible.

Solution 2:

Don't bother. There is no foolproof way of doing this. Ultimately, if you're publishing the content (and source code), then you have to accept that other people will be able to copy it.

Any solution to this is going to rely on the user's browser cooperating, but the browser is under the control of the user, so you can't make this assumption. Usually it's simply a case of disabling JavaScript, which is trivial. It'll also be irritating and patronizing for many of your users.

Solution 3:

This article will show you how to disable the right click, but let's remember these points:

  1. If the user has JavaScript disabled they will still be able to right click
  2. It's a massive usability issue, as it stops the user from using any other of the context menu functions
  3. If someone really wanted to copy / steal your content there are other ways, disabling right click is not the way to do it.

To be honest, trying to prevent a user from stealing content in this obtrusive manner is probably going to spur them on the find another method...

So in short, think twice before implementing this.

Solution 4:

In short. You can't.

Disabling things like right clicking in Javascript are just annoying for end users. And it doesn't prevent them from saving the file or viewing the source from the browser menu or shortcut or various other means.

Don't bother.

Solution 5:

Developers and clients who request these type of features just doesn't "get" what the internet and the www are all about.

Post a Comment for "Disable Right Click And Copy Paste Etc .. From My Web Page"