Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 620
ponds Avatar asked May 09 '11 14:05

ponds


People also ask

How do I restrict a screenshot of a Web page?

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.

How do I turn off the Print option on a website?

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.

Is it possible to prevent screenshot?

Luckily, the Android system provides a built-in mechanism for blocking screenshots which is available from Android Honeycomb (3.0).

How do I stop HTML from taking screenshots?

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.


1 Answers

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.

like image 122
ThiefMaster Avatar answered Nov 15 '22 02:11

ThiefMaster