How can I disable the screen print feature for a web page in all browsers?

Using the following, we can turn off print screens or screenshots in Internet Explorer:

<body onload=setInterval("window.clipboardData.setData('text','')",2) oncontextmenu="return false" onselectstart="return false"> 

But they do not work in Mozilla, Chrome and other browsers.

Is there a better way to turn off screen / screenshot printing?

+3
source share
4 answers

Why do you think this is your decision if people should be able to take screenshots or not?

Fortunately, no browser except IE allows you to access the buffer through JavaScript, so you're out of luck :)

By the way, if I visited your site and it mixed up my clipboard (it overwrites something there, even if it is not connected to your site) - I could write something in it that I just cut from some either a file and I was about to insert another file, and thanks to your site it will now be lost.

So, the conclusion: Stop doing shit.

+22
source

If you give a sample of something that you later want to sell to a customer, then one thing you can do is use the image with the words "Copyrighted Material" and use it as a background on a web page, such as a watermark. Disabling text selection, context menus, and copying using CTRL + A is possible in both cases. and Chrome, although I forgot now how I did it (it was a CSS solution and pretty simple). In any case, so that the one thing that can be done is if you cannot protect it, spoil it so that it is unsuitable. Image sites use this method by watermarking their images, which can be implemented on server-side websites with php, etc.

0
source

Try onKeyPress catch the PrtScr button and return false. This is not very, but I think it will work.

-3
source
 window.addEventListener("keyup",kPress,false); function kPress(e) { var c=e.keyCode||e.charCode; if (c==44) alert("print screen"); } 
-6
source

Source: https://habr.com/ru/post/1434274/


All Articles