/    Sign up×
Community /Pin to ProfileBookmark

prevent image printing

I am about to put some of my own photography work on a web site I am designing. How do i prevent users looking at the web site from printing the images

to post a comment
HTML

5 Comments(s)

Copy linkTweet thisAlerts:
@ray326Mar 28.2004 — The short answer is, you can't. Whatever you let them see they can print. You can make the image small and/or highly compressed so a print out is low quality but that's about it.
Copy linkTweet thisAlerts:
@rhsundergroundMar 28.2004 — the best thing you could do would be to add a watermark to the image so that it is specifically identified as your work.
Copy linkTweet thisAlerts:
@SamMar 28.2004 — although, if you just want to disable an image from being printed directly from the webpage (for example a very large/colorful image), you could define a print media, and have that image set to display:none. if you do this however, you should have a way to print the image as an alternative
Copy linkTweet thisAlerts:
@NadirMar 28.2004 — like ray said you can't stop them from printing cos they could print screen etc. but heres a script i used for my site, It stops both right and left click:

<head>

<SCRIPT LANGUAGE="JavaScript1.1">

function right(mousebutton)

{

var msg1 = "copyright ©!";

var msg2 = "copyright ©!";

if (navigator.appName == 'Netscape' && mousebutton.which==3)
{
alert(msg1);
return false;
}
else

if (navigator.appName == 'Netscape' && mousebutton.which==1)
{
alert(msg2);
return false;
}
else

if (navigator.appName == 'Microsoft Internet Explorer' && event.button == 1)
{
alert(msg1);
return false;
}
else

if (navigator.appName == 'Microsoft Internet Explorer' && event.button == 2)
{
alert(msg2);
return false;
}
return true;

}

document.onmousedown = right;

// -->

</SCRIPT>
Copy linkTweet thisAlerts:
@Paul_JrMar 28.2004 — [i]Originally posted by Nadir [/i]

[B]like ray said you can't stop them from printing cos they could print screen etc. but heres a script i used for my site, It stops both right and left click:



<head>



<SCRIPT LANGUAGE="JavaScript1.1">

function right(mousebutton)

{

var msg1 = "copyright ©!";

var msg2 = "copyright ©!";



if (navigator.appName == 'Netscape' && mousebutton.which==3)
{
alert(msg1);
return false;
}
else

if (navigator.appName == 'Netscape' && mousebutton.which==1)
{
alert(msg2);
return false;
}
else

if (navigator.appName == 'Microsoft Internet Explorer' && event.button == 1)
{
alert(msg1);
return false;
}
else

if (navigator.appName == 'Microsoft Internet Explorer' && event.button == 2)
{
alert(msg2);
return false;
}
return true;

}

document.onmousedown = right;

// -->

</SCRIPT> [/B][/QUOTE]

No right-click scripts are very annoying, and very useless. I'm pretty sure that if someone comes across your site, and finds out they can't use some feature of their computer, they will leave immediately. Besides, those who really want the images, will get them anyways.
×

Success!

Help @jerrypatterson spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...