Tuesday 4 November 2014

Disable Copy and Paste for greater website security

One of the most popular questions I recieve here at Hypergurl is "How do you stop visitors from stealing your webpage information?"

Below is a little trick that will stop your visitors from copying and pasting your webpage information. Anyone with experience may know a way around this trick. However it will make it hard enough to discourage them and get them moving on to easier targets.

Add the following html code to your BODY tag: 

Here is how your BODY tag may look once implimented: 
<body ondragstart="return false" onselectstart="return false">

Complete Code: 

<html>
    <head>
        <title>Test</title>
    </head>
    <body ondragstart="return false" onselectstart="return false">
        <p>This is test text</p>
    </body>

</html>

Happy Coding !!