How can I disable print-screen functionality for a webpage in all browsers?

ponds picture ponds · May 9, 2011 · Viewed 31.3k times · Source

Using the following we can disable print-screens or screenshots in Internet Explorer:

<body onload=setInterval("window.clipboardData.setData('text','')",2) 

oncontextmenu="return false" onselectstart="return false">

But these don't work in Mozilla, Chrome and other browsers.

Is there a better way to disable print-screens/screenshots?

Answer

ThiefMaster picture ThiefMaster · May 9, 2011

What makes you think it's your decision if people should be able to take screenshots or not?

Luckily no browser but IE allows you to access the clipboard via JavaScript so you are out of luck :)

By the way, if I visited your site and it messed up my clipboard (it overwrites anything in there, even if it's unrelated to your site) - I might have stored something in it that I've just cut from some file and I was going to paste in a different file and thanks to your site it would now be lost.

So, the conclusion is: Stop doing crap like that.