Avatar of whbcn
whbcn
Flag for China asked on

How do disable print screen in a web page

Hi all,
In my case, I would like to make the print screen disabled when an image popout in my web page.I am using the following javascript to clean the clipboard interval 250ms to achieve my goal.
setInterval("clipboardData.setData('Text','');",250);
But the problem is that the user need to set the IE security of the clipboard enabled.I want to disable the print screen and the user not need set anything.Any other good idea about this case?
JavaScriptWeb Development

Avatar of undefined
Last Comment
whbcn

8/22/2022 - Mon
NarendraG

No, it is not possible. Even if it was possible with JavaScript, the user could simply disable JavaScript to bypass it.
QPR

Considering that the user already has your image (temp internet files) when they view it, nothing you can do can stop them from having it.
You could put a transparent div over the image which would stop right click save as or you could put a water mark over your images but either way it is on their hard drive if they know where to look
hernst42

not possible as there are good reasons to not allow the browser to modify the clipboard per default.
There are also a lot of other tools which can make screenshots without using the clipboard.
Your help has saved me hundreds of hours of internet surfing.
fblack61
whbcn

ASKER
The user clicks a button and popout a special image in a div that can not be saved right click, and the image is generated from a servlet that there is not temp internet file.
I just want to disable the print screen simply, not need to consider the other screenshot tools, not need to consider the user is an advanced PC user.
I don't want  the special image easy cutted just click the print screen button.
QPR

No can do. Sorry
Good job too! Who wants web pages that are able to change my settings?
kadaba

Simpler... if you need to protect your image you could use your water mark and render the image.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
QPR

this was mentioned quite a few posts ago kadaba :)
kadaba

Oh man, I dint observe that, thanks for pointing that out :)
Then that should go as accepted ;)
whbcn

ASKER
Any other solutions?Except javascript, how about using a applet in a web page?(Users have installed jre)
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
ASKER CERTIFIED SOLUTION
QPR

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Michel Plungjan

Much better giving them a poorer resolution with a watermark.
whbcn

ASKER
The answer was not solution, but useful.