Can I prevent print screen on a webpage? Is it possible or not?

cbnvbxcbvnbxcbv picture cbnvbxcbvnbxcbv · Jan 6, 2014 · Viewed 8.5k times · Source

I want to disable print screen on a web page in a website. I have used many type codes for doing this but I could not succeed:

<script type="text/javascript"> 
    $(document).ready(function() {
        $(window).keyup(function(e) {
            if (e.keyCode == 44) {
                alert('keyup');
                return false;
            }
        }); 

        $(window).keydown(function(e) {
            if (e.keyCode == 44) {
                alert('keydown');
                return false;
            }
        });
    });
</script>

This code is not working and similar other attempts I tried also did not work. My question is that - is it possible or not? If yes, then how do I do this?

Answer

Quentin picture Quentin · Jan 6, 2014

No, it is impossible to prevent someone from taking a screenshot while viewing your website.