Implement this method only if it does not affect the loyalty of your audience

What is parsing? Image by vectorjuice on Freepik. Disable copying to clipboard Another way to protect against text theft is to disable the function of adding to the clipboard. This is the name of the temporary storage where information is plac when using the Cut and Copy commands. If you prohibit the use of this buffer, manual copying of text materials from a web page will be impossible. That is, a person will be able to select words, give the necessary command, but the action itself will not occur: the clipboard will remain empty, and there will be nothing to extract from there. To set up such a ban, you will ne to use JavaScript.

Emb the following script into the page code documentadd

EventListenerIf you don’t understand the JS language, it’s better to entrust the work to the developers/administrators of your site. Extra female number data scripts can disrupt the execution of the main code, so it’s not worth taking unnecessary risks. Moreover, this method is no more effective than the previous one as a countermeasure to parsing. It will help against manual copying by inept hands, but you won’t be able to avoid software parsing.

special data

Adding a link when copying text

This method will not protect content from theft, but it will help make life more difficult for copypastas and, perhaps, even improve your site’s in this post we will teach SEO. The idea is that you do not prohibit highlighting and copying words, but you attach a link to the copi fragment that leads to your page. That is, additional text is plac in the clipboard indicating the original source, and when a person pastes it somewhere, a link is automatically insert there – usually in the middle of or after the highlight text.

This protection is implement through JavaScript code

For example, you can use the following bulk lead construction: document.addEventListener(‘copy’, function(e) { var select Text = window.getSelection().toString(); var textWithLink = select Text + ‘ (Источник: example.com)’; e.clipboardData.setData(‘text/plain’, textWithLink); e.preventDefault.

Scroll to Top