{"id":2639,"date":"2012-05-01T08:56:43","date_gmt":"2012-05-01T08:56:43","guid":{"rendered":"http:\/\/2slick.com\/web\/?p=2639"},"modified":"2016-01-08T11:24:51","modified_gmt":"2016-01-08T11:24:51","slug":"disable-ctrl-c","status":"publish","type":"post","link":"https:\/\/2slick.com\/web\/disable-ctrl-c\/affordablewebsitestips\/tutorials","title":{"rendered":"Disable Ctrl-c"},"content":{"rendered":"<p>Is there a way to stop people from copying text on my web page? There is always a way for visitors to copy text and images from an HTML web page. It is possible to make it more difficult for visitors to copy your website text content. Most people use the \"Ctrl-C\" keys to copy text. You can disable the Ctrl-c action or the copy text key command from&nbsp;happening&nbsp;on your web page by doing the following.<\/p>\n<h3>How to disable Control copy(C) on your web page<\/h3>\n<ol>\n<li>Place this code snippet in the header section of your html document.\n<p><!--DEVFMTCODE--><pre class=\"devcodeblock\" title=\"Javascript\"><table class=\"devcodetools\"><tbody><tr><td>&nbsp;Javascript&nbsp;|&nbsp;<\/td><td style=\"background-image:url('https:\/\/2slick.com\/web\/wp-content\/plugins\/devformatter\/img\/devformatter-copy.png');background-repeat:no-repeat;background-position:50% 50%;width:16px;height:16px;\"\/><embed id=\"ZeroClipboard1\" src=\"https:\/\/2slick.com\/web\/wp-content\/plugins\/devformatter\/_zclipboard.swf\" loop=\"false\" menu=\"false\" quality=\"best\" bgcolor=\"#ffffff\" width=\"16px\" height=\"16px\" align=\"middle\" allowScriptAccess=\"always\" allowFullScreen=\"false\" type=\"application\/x-shockwave-flash\" pluginspage=\"http:\/\/www.macromedia.com\/go\/getflashplayer\" flashvars=\"id=1&width=16&height=16\" wmode=\"transparent\" \/><\/td><td>&nbsp;copy&nbsp;code&nbsp;|<\/td><td style=\"cursor:pointer\" title=\"DevFormatter Plugin\" onclick=\"devfmt_credits()\">?<\/td><td width=\"99%\">&nbsp;<\/td><\/tr><\/tbody><\/table><div class=\"devcodeoverflow\"><table class=\"devcodearea\" width=\"100%\"><tr><td class=\"devcodelines\" width=\"1%\">01<\/td><td class=\"devcodelinesarea\"><pre class=\"devcode devcodeline\"><span style=\"color: #339933;\">&lt;<\/span>script type<span style=\"color: #339933;\">=<\/span><span style=\"color: #3366CC;\">&quot;text\/javascript&quot;<\/span><span style=\"color: #339933;\">&gt;<\/span><span style=\"color: #006600; font-style: italic;\">\/\/ &lt;![CDATA[<\/span><\/pre><\/td><\/tr><tr><td class=\"devcodelines devcodelinesodd devcodelinesodd\" width=\"1%\">02<\/td><td class=\"devcodelinesarea devcodelinesareaodd devcodelinesareaodd\"><pre class=\"devcode devcodeline\"><span style=\"color: #003366; font-weight: bold;\">function<\/span> onKeyDown<span style=\"color: #009900;\">&#40;<\/span><span style=\"color: #009900;\">&#41;<\/span> <span style=\"color: #009900;\">&#123;<\/span><\/pre><\/td><\/tr><tr><td class=\"devcodelines\" width=\"1%\">03<\/td><td class=\"devcodelinesarea\"><pre class=\"devcode devcodeline\">  <span style=\"color: #006600; font-style: italic;\">\/\/ current pressed key<\/span><\/pre><\/td><\/tr><tr><td class=\"devcodelines devcodelinesodd devcodelinesodd\" width=\"1%\">04<\/td><td class=\"devcodelinesarea devcodelinesareaodd devcodelinesareaodd\"><pre class=\"devcode devcodeline\">  <span style=\"color: #003366; font-weight: bold;\">var<\/span> pressedKey <span style=\"color: #339933;\">=<\/span> String.<span style=\"color: #660066;\">fromCharCode<\/span><span style=\"color: #009900;\">&#40;<\/span>event.<span style=\"color: #660066;\">keyCode<\/span><span style=\"color: #009900;\">&#41;<\/span>.<span style=\"color: #660066;\">toLowerCase<\/span><span style=\"color: #009900;\">&#40;<\/span><span style=\"color: #009900;\">&#41;<\/span><span style=\"color: #339933;\">;<\/span><\/pre><\/td><\/tr><tr><td class=\"devcodelines\" width=\"1%\">05<\/td><td class=\"devcodelinesarea\"><pre class=\"devcode devcodeline\">  <span style=\"color: #000066; font-weight: bold;\">if<\/span> <span style=\"color: #009900;\">&#40;<\/span>event.<span style=\"color: #660066;\">ctrlKey<\/span> <span style=\"color: #339933;\">&amp;&amp;<\/span> <span style=\"color: #009900;\">&#40;<\/span>pressedKey <span style=\"color: #339933;\">==<\/span> <span style=\"color: #3366CC;\">&quot;c&quot;<\/span> <span style=\"color: #339933;\">||<\/span> <\/pre><\/td><\/tr><tr><td class=\"devcodelines devcodelinesodd devcodelinesodd\" width=\"1%\">06<\/td><td class=\"devcodelinesarea devcodelinesareaodd devcodelinesareaodd\"><pre class=\"devcode devcodeline\">                        pressedKey <span style=\"color: #339933;\">==<\/span> <span style=\"color: #3366CC;\">&quot;v&quot;<\/span><span style=\"color: #009900;\">&#41;<\/span><span style=\"color: #009900;\">&#41;<\/span> <span style=\"color: #009900;\">&#123;<\/span><\/pre><\/td><\/tr><tr><td class=\"devcodelines\" width=\"1%\">07<\/td><td class=\"devcodelinesarea\"><pre class=\"devcode devcodeline\">    <span style=\"color: #006600; font-style: italic;\">\/\/ disable key press processing<\/span><\/pre><\/td><\/tr><tr><td class=\"devcodelines devcodelinesodd devcodelinesodd\" width=\"1%\">08<\/td><td class=\"devcodelinesarea devcodelinesareaodd devcodelinesareaodd\"><pre class=\"devcode devcodeline\">    event.<span style=\"color: #660066;\">returnValue<\/span> <span style=\"color: #339933;\">=<\/span> <span style=\"color: #003366; font-weight: bold;\">false<\/span><span style=\"color: #339933;\">;<\/span><\/pre><\/td><\/tr><tr><td class=\"devcodelines\" width=\"1%\">09<\/td><td class=\"devcodelinesarea\"><pre class=\"devcode devcodeline\">  <span style=\"color: #009900;\">&#125;<\/span><\/pre><\/td><\/tr><tr><td class=\"devcodelines devcodelinesodd devcodelinesodd\" width=\"1%\">10<\/td><td class=\"devcodelinesarea devcodelinesareaodd devcodelinesareaodd\"><pre class=\"devcode devcodeline\"><span style=\"color: #009900;\">&#125;<\/span> <span style=\"color: #006600; font-style: italic;\">\/\/ onKeyDown<\/span><\/pre><\/td><\/tr><tr><td class=\"devcodelines\" width=\"1%\">11<\/td><td class=\"devcodelinesarea\"><pre class=\"devcode devcodeline\"><span style=\"color: #006600; font-style: italic;\">\/\/ ]]&gt;&lt;\/script&gt;<\/span><\/pre><\/td><\/tr><\/table><\/div><\/pre><!--END_DEVFMTCODE--><\/li>\n<li>If you have a WordPress website you can access your header code by logging into admin then clicking on 'Appearance' &gt; 'Editor' &gt; 'Header'. Don't forget to save your changes.<\/li>\n<\/ol>\n<p>Again, users can still view the source code of your web page and copy your text there if they're savvy enough. When you disable control c or control copy, you're only making it more difficult for them to copy you're not preventing them from copying your text.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Is there a way to stop people from copying text on my web page? There is always a way for visitors to copy text and images from an HTML web page. It is possible to make it more difficult for visitors to copy your website text content. Most people use the &#8220;Ctrl-C&#8221; keys to copy [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,143,4,6],"tags":[339],"class_list":["post-2639","post","type-post","status-publish","format-standard","hentry","category-affordablewebsitestips","category-internet-tips","category-tutorials","category-wordpress","tag-disable-page-copy"],"_links":{"self":[{"href":"https:\/\/2slick.com\/web\/wp-json\/wp\/v2\/posts\/2639","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/2slick.com\/web\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/2slick.com\/web\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/2slick.com\/web\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/2slick.com\/web\/wp-json\/wp\/v2\/comments?post=2639"}],"version-history":[{"count":9,"href":"https:\/\/2slick.com\/web\/wp-json\/wp\/v2\/posts\/2639\/revisions"}],"predecessor-version":[{"id":9279,"href":"https:\/\/2slick.com\/web\/wp-json\/wp\/v2\/posts\/2639\/revisions\/9279"}],"wp:attachment":[{"href":"https:\/\/2slick.com\/web\/wp-json\/wp\/v2\/media?parent=2639"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/2slick.com\/web\/wp-json\/wp\/v2\/categories?post=2639"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/2slick.com\/web\/wp-json\/wp\/v2\/tags?post=2639"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}