How can I block a content from being copied and right clicked
...................................I want to block some images and some text........ please I want it fast

Recommended Answers

All 2 Replies

There is no absolute way to protect images or text. If I need to copy a picture that is somehow blocked, I'll take a screen shot or copy it with a screen copy utility.

A couple of things that you can try:
<body oncontextmenu="return false">
to disable right-clicks (but it isn’t 100%)

and/or

<body ondragstart="return false" onselectstart="return false">

There are a bunch of other things that you can try and if you do a search, I'm sure that you will find them. Some are specific to certain browsers and some only work if Javascript is turned on.

You cant
anything that is displayed is downloaded to the client computer before it is displayed,
the user has absolute control

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.