Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


Akhter Rasool
Akhter Rasool
8,597 Points

prevent screenshot

can i prevent user from taking screenshot of my webpage? If yes, please could you tell me what technology i can use ?

Abhishek Bhardwaj
Abhishek Bhardwaj
3,316 Points

try this code :

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

1 Answer

Nicholas Grenwalt
Nicholas Grenwalt
46,626 Points

There are so many tools nowadays for getting a screenshot that doing this is pretty much impossible. Everything that is on the web is pretty much up for grabs.