image protection

Discussion in 'Javascript' started by luc, Apr 8, 2004.

  1. luc

    luc Guest

    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?
    luc, Apr 8, 2004
    #1
    1. Advertising

  2. luc

    Hywel Guest

    In article <vB8dc.64014$-ops.be>,
    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
    Hywel, Apr 8, 2004
    #2
    1. Advertising

  3. "luc" <> 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
    Knud Gert Ellentoft, Apr 8, 2004
    #3
  4. luc

    Ivo Guest

    "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
    Ivo, Apr 8, 2004
    #4
  5. "luc" <> 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.oncontextmenu=m.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+Feeling+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 -
    DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
    'Faith without judgement merely degrades the spirit divine.'
    Lasse Reichstein Nielsen, Apr 8, 2004
    #5
  6. luc

    Chris Hope Guest

    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/
    Chris Hope, Apr 8, 2004
    #6
  7. luc

    Grant Wagner Guest

    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 <>

    * Client-side Javascript and Netscape 4 DOM Reference available at:
    *
    http://devedge.netscape.com/library/manuals/2000/javascript/1.3/reference/frames.html

    * Internet Explorer DOM Reference available at:
    *
    http://msdn.microsoft.com/workshop/author/dhtml/reference/dhtml_reference_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-developer/upgrade_2.html
    Grant Wagner, Apr 21, 2004
    #7
  8. luc

    epcsoft Guest

    epcsoft, May 7, 2004
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. g
    Replies:
    69
    Views:
    2,143
    Oliver Wong
    Apr 25, 2006
  2. Jacqui or (maybe) Pete

    Re: OT: Re: Image Protection

    Jacqui or (maybe) Pete, Jun 22, 2003, in forum: HTML
    Replies:
    0
    Views:
    1,215
    Jacqui or (maybe) Pete
    Jun 22, 2003
  3. Woolly Mittens

    Re: Image Protection

    Woolly Mittens, Jun 23, 2003, in forum: HTML
    Replies:
    0
    Views:
    864
    Woolly Mittens
    Jun 23, 2003
  4. David C. Barber

    Re: Image Protection

    David C. Barber, Jun 23, 2003, in forum: HTML
    Replies:
    0
    Views:
    868
    David C. Barber
    Jun 23, 2003
  5. Garma

    Re: Image Protection

    Garma, Jun 29, 2003, in forum: HTML
    Replies:
    2
    Views:
    850
    Garma
    Jun 29, 2003
Loading...

Share This Page