how to block image copying from html page..

Status
Not open for further replies.

nikku12982

Broken In
is there any way to block right click option and also saving image through html page ..pls help... any code or any tricks
 

Anand_RF

Journeyman
No you cant stop anyone from saving images on a page. As for the right-click block, there is a code which works only for IE, not for firefox or opera.
And I don't know it. :( But I think you can find the code at www.hotscripts.com
 

sakumar79

Technomancer
Even with that, you just have to disable javascript and the file will be accessible... I think what you can do is create a flash file and embed the jpeg within it... The flash file may be retrievable but the image may not be available, but I am not sure about this.

Arun
 

NikhilVerma

Padawan
You can never do that even with flash people can just use the ScreenCopy button and paste it in notepad for the image.
 

hafees

In the zone
If a person is determined to save an image from the web page, no one can restrict him.

But these three methods can be used to restrict a casual user from saving images.
1. Disabling the right click button : by using the oncontextmenu
eg: <body oncontextmenu="return false;"> .(It does nt need to be on the body tag. instead, it can be given to the DIV tag where the image is displayed)
Problems : IE and FF will work as intented. But opera doesnt know about the oncontextmenu. so it willnot work with Opera

2. By giving the original image as background, and cover it with a transparent gif image using <img> tag. In this way, when the user rightclicks and saves the image, the transparent image will be saved. In this way user is fooled.

3. Using Flash.

But all three are not perfect solutions. Methods 1 & 2 are easily tampered by saving the webpage to a local folder and then any can find the required image.

The flash method is also not very useful coz, there are decompilers which will save all files embedded in the flash movie.
 
Status
Not open for further replies.
Top Bottom