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?
One common method to prevent image theft is simply to disable your website visitors' ability to right/alt-click on images to prevent them from directly saving your images. You might think that this is not particularly effective because people could easily take screenshots of your images.
this can be done by simple css code. CSS code means Cascading Style sheet. Jut add a print media query in css file. if you will add this CSS code in head section of HTML tag then visitor can not print webpage.
Luckily, the Android system provides a built-in mechanism for blocking screenshots which is available from Android Honeycomb (3.0).
All these commands are controlled by our operating system, and we can't disable or block them in the browser using HTML/CSS/JavaScript. So, we can't prevent users from taking screenshots.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With