How to protect content in webpage? | SoloLearn: Learn to code for FREE!

+1

How to protect content in webpage?

If someone long tap or double click in text line in webpage, then text line has selected for copy, how to protect text and image being copy.

5/9/2018 8:55:38 PM

Mr. Jay Koranga

4 Answers

New Answer

+4

They can still be copied by removing it with developer tools. There's no way to protect your content.

+3

That's easy... Just add user-select: none; to the CSS of your main div

+1

+1

You can use some front-end CSS and JS to protect from the average user, but anybody will minimal knowledge of the developer console can still get around this. To protect images the best thing to do is copyright them.