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

8.6k views Asked by At

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?

2

There are 2 answers

1
Quentin On

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

0
Suhas Gosavi On

No you can not, Not from a webpage.

Consider rethinking whether you really need to do this.

The internet is for sharing.