[thelist] Preventing right-clicking on a page?

David Dorward evolt at david.us-lot.org
Mon Oct 14 08:43:00 CDT 2002


On Mon, Oct 14, 2002 at 08:27:51AM -0500, Kyle Murphy wrote:
> I've seen this before, mainly on Warez sites and such...But, I was
> wondering if anyone could help me out in telling me where I could find
> some code that prevents right-clicking on a page.  Usually, a message
> pops up letting the user know that they can't right-click.

It is impossible to prevent people from right clicking or from accessing
the context menu.

There are ways to make it slightly harder to get to, but these are mearly
irritating.

The right click context menu in most browsers has a host of useful features
such as bookmark, print, and back attached. If you try to make it harder
for people to use these then you are only going to alienate your
audience.

A few ways to bypass the idiotic right click blocking scripts include

* Disabling JavaScript
* Going through the menus to view source
* Digging files out of the browser cache
* Holding down the right mouse button while the alert() is displayed
    and tapping the spacebar
* Saving the page (picking the option to save all the images et al
    with it).

There are others.

Don't try to block the right click, it has no benefits and lots of negative
side effects.


--
David Dorward                                   http://david.us-lot.org/
"You cannot rewrite history, not one line."
                                      - The Doctor (Dr. Who: The Aztecs)



More information about the thelist mailing list