473,324 Members | 2,254 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

image protection

luc
I have found some code that will prevent visitors to our website from right
clicking on our images to save them to there disk. But in windows xp this
code is useless because when you rollover an image, a little icon wil appear
making it possible to save, print out or even email it. Is there a way to
prevent this?
Jul 23 '05 #1
7 1630
In article <vB*********************@phobos.telenet-ops.be>,
an*******@disneyland.com says...
I have found some code that will prevent visitors to our website from right
clicking on our images to save them to there disk.
No, you haven't.

But in windows xp this
code is useless because when you rollover an image, a little icon wil appear
making it possible to save, print out or even email it. Is there a way to
prevent this?


No.

--
Hywel I do not eat quiche
http://kibo.org.uk/
http://kibo.org.uk/mfaq.php
Jul 23 '05 #2
"luc" <an*******@disneyland.com> skrev :
I have found some code that will prevent visitors to our website from right
clicking on our images to save them to there disk.
Why do you think, this will protect your pics from saving?
But in windows xp this
code is useless because when you rollover an image, a little icon wil appear
making it possible to save, print out or even email it. Is there a way to
prevent this?


Nothing with javascript, in <head>, but still it won't protect
anything.

<META HTTP-EQUIV="imagetoolbar" CONTENT="no"">
--
Knud
Jul 23 '05 #3
Ivo
"luc" wrote
I have found some code that will prevent visitors to our website from right clicking on our images to save them to there disk. But in windows xp this
code is useless because when you rollover an image, a little icon wil appear making it possible to save, print out or even email it. Is there a way to
prevent this?


There is a meta tag you can insert in the head of the page that will prevent
the 'icon' as you call it (I see four icons) in IE6 on windows xp and other
windows versions too. But it will not stop me from copying your images.
This code you found is useless. Disabling my right-click-menu will not
prevent me from dragging your image onto my desktop or straight into my
image editing program with my left mousebutton. It will only annoy (and
highly so) me and others who use the right-click-menu for other purposes
too. I can print-screen with and without javascript, or browse my cache to
retrieve any and all files separately. I can even take my camera and
photograph my computer monitor.
There is no solution against the copying of images. Certainly not a
javascript solution. Think of all your users who do not have javascript
enabled in the first place.
If you don't want something copied, don't put it on the internet.
Ivo
Jul 23 '05 #4
"luc" <an*******@disneyland.com> writes:
I have found some code that will prevent visitors to our website from right
clicking on our images to save them to there disk. But in windows xp this
code is useless because when you rollover an image, a little icon wil appear
making it possible to save, print out or even email it. Is there a way to
prevent this?


Yes (and it's not WinXP, it's IE 6 that adds the image tool bar).

But before telling how, you should know that the code is inadequate in
so many other ways. Preventing right click is at best a nuisance, and
at worst a detractor for your page. It will not stop anybody with the
knowledge to use the image for anything, from getting it. It doesn't
prevent Save as: "Web page, complete". It doesn't prevent you from
finding the image in the cache. It doesn't prevent turning Javascript
off, which foils the scheme completely. It doesn't prevent asking
on a newsgroup, where more knowledgeable people can give several
other unpreventable methods. Here is a bookmarklet that foils most
schemes with one click:

<URL:javascript:(function(i,m){for(;i<m.length;i++ ){m[i].oncontextmenu=m[i].onclick=null;}}(0,document.images))>

(Don't try to read it, it's written for brevity, not readability. All
it does is to loop through all images and remove onclick and
oncontextmenu handlers)

In short: If you don't want the image to be saved, don't put it on a
web page. A watermark or copyright notice will do much more to detract
inappropriate use than any technical measure.
Anyway, for your question:
<URL:http://www.google.com/search?q=disable+image+tool+bar+&btnI=I%27m+Feelin g+Lucky>

I recommend using the META-method, as it is not invalid HTML.

If you really want to prevent right-clicking (or rather, the right
click menu), the simplest method is to add
oncontextmenu="return false;"
to the img tag:
<img src="..." oncontextmenu="return false;">
(It also has the advantage of not working in my browser, but neiter
does using the onclick handler)

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 23 '05 #5
luc wrote:
I have found some code that will prevent visitors to our website from
right clicking on our images to save them to there disk. But in windows xp
this code is useless because when you rollover an image, a little icon wil
appear making it possible to save, print out or even email it. Is there a
way to prevent this?


You can never stop a determined visitor from downloading the image even if
you do disable right-clicking. For a start the image is already on their
computer for them to be able to view it, and secondly you can just disable
Javascript, reload the page and voila, you can right-click again.

Chris

--
Chris Hope
The Electric Toolbox Ltd
http://www.electrictoolbox.com/
Jul 23 '05 #6
luc wrote:
I have found some code that will prevent visitors to our website from right
clicking on our images to save them to there disk. But in windows xp this
code is useless because when you rollover an image, a little icon wil appear
making it possible to save, print out or even email it. Is there a way to
prevent this?


In addition to everything everyone else has said, I want to point out that I can
get everything off your page without loading it into a "Web browser" at all. I
can harvest your entire site, and everything on it, using "wget". No need to
worry about whether images are in my browser cache, no need to worry about
defeating right-click blockers. A simple command and I will have every linked
document on your Web site.

<url: http://www.delorie.com/gnu/docs/wget/wget_31.html />

wget -r http://www.yoursite.com

Whoops! All your hard work annoying your users by disabling right mouse clicks
is pointless.

Once a resource is available for unrestricted read using the http protocol,
there is no way to "protect" it. Period. Full stop. EOF.

--
| Grant Wagner <gw*****@agricoreunited.com>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/...ce/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/a...ence_entry.asp

* Netscape 6/7 DOM Reference available at:
* http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 7 / Mozilla
* http://www.mozilla.org/docs/web-deve...upgrade_2.html

Jul 23 '05 #7
Hi:

Maybe can use image watermark to protect,you can try Easy Batch
Watermark 1.5,free download here:
http://www.soft32.com/download_25962.html
Jul 23 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: dave | last post by:
Hello there, I am at my wit's end ! I have used the following script succesfully to upload an image to my web space. But what I really want to be able to do is to update an existing record in a...
3
by: Yang | last post by:
Anyone know a way to download an image using php which has a hotlink protection ?
3
by: Marcin Kowalewski | last post by:
Hi I've got a stupid problem with code below : using System; using System.Drawing; .... public class CsrcImage :Image { public CsrcImage() { //
8
by: Dave Quigley | last post by:
Hello everyone.... Im currently starting my targa support project again for ..NET and I am wondering if there are any particular interfaces or classes that Im supposed to extend in order to do this...
6
by: comp.lang.php | last post by:
/** * Generate the random security image * * @access public * @param $willUseFilePath (default false) boolean to determine if you will be using a file path * @param mixed $filePath (optional)...
24
by: Manuel | last post by:
Is it possible to embed an image, like a company logo in a CDOSYS generated message? If yes, I´ll apreciate some code sample. I´ve been able to format messages in html the way I like, but I...
5
by: Jerry J | last post by:
I want to use the System.Drawing.Image class. According to the help file, this is an abstract base class. Because it is supposedly abstract, I created another class that inherits from it. However,...
13
by: NickName | last post by:
"For the vision impaired, SVG offers tremendous potential for interactive Internet mapping applications as discussed by Gardner and Bulatov (2001).". Now, here's an SVG file with fair/medium...
4
by: Tim Streater | last post by:
I have a small image on my web page that, when clicked, does some javascript stuff which changes the page. To highlight that this has happened, I want to replace the image with another. Each is a...
7
by: =?Utf-8?B?TWlrZQ==?= | last post by:
Hi. I have an ASP.NET 2.0 web application which contains an Images directory with all website images. How can I prevent other websites from creating img tags with the source as my images? I want...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.