What are the ways to prevent users to take screenshot of a webpage? [duplicate]

℡╲_俬逩灬. 提交于 2019-11-27 13:29:18

问题


Possible Duplicate:
How do i prevent from printscreen of my webpage?

I want to prevent users from taking screen shots of a web-page. What should be the code I have to place in that .html file?

What should be the code to prevent button press like print screen? Because many website prevents users from pressing any keys.


回答1:


It is possible. Try this css3 feature.

@media print {
    html, body {
       display: none;  /* hide whole page */
    }
}



回答2:


Simple. Don't publish any content worth stealing. Most of the web uses this technique, IMHO.




回答3:


Own the computer the user is using and take OS measures to that. And don't forget, the user can always take a picture with a camera...




回答4:


Screenshots are not controlled by the web browser, they are controlled by software running on the user's operating system and cannot be remotely controlled by a web server.




回答5:


You cannot block the print screen button or the snipping tool in Windows 7 or the Grab application included with Mac OS or...




回答6:


Nelson's right. There's a lot you can do to make it harder (javascript to capture the prtsc key press and return false, flicker different quadrants of the screen at intervals so that it's too fast for human eyes to really tell but so that the whole screen never shows at once, etc) but fundamentally anyone who's even vaguely tech-savy can bypass this in about 5 seconds. Also, a google search should have answered this for you in way less time than it took to ask.




回答7:


using Javascript is an option only to prevent key pressing.



来源:https://stackoverflow.com/questions/12429439/what-are-the-ways-to-prevent-users-to-take-screenshot-of-a-webpage

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!