How to Disable Text Selection on Your Website- Restrict Users from Copying Your WEB Content

04 Jul

So the question is, how to disable text selection ? So lets learn about some different scenarios of preventing pages from being copied on your websites and blogs-

Few reasons i can think of restricting people from copying your content-
  • Fist and foremost benefit, prevent copying text
  • You can prevent downloading of images on your blog or website
  • Restrict people from viewing your source code via right click menu
  • Restricts saving pages and post via right click feature


  1. Disable Right Click Menu on Your Website-

This is the very simple procedure that helps you in securing your text from being copied, the problem with this feature is, it disables right menu on the other hand the same menu help’s you in featuring many other things on your site, this right click menu allowing your visitors to easily access your blog. This feature can be very useful on some pages like privacy policy, about us or on pages where your don’t need to use right click menu, mmmm……. funny! but true people on web also copying these pages from your site because the are not creative the way you are, so here you should have a disabled right click feature on some pages.

Note-  Disabling right click menu does not guarantee you to beat these content scrappers cause they still have alternative options to do same things with your pages. even though right click menu is the most common way of copying your content in this scenario, Implement this feature on sensitive area of your site only cause a disabled menu going to be a annoying experience for your visitors. So if you are implementing this feature on sensitive pages only than its going to be fruitful for you.


How it Works?-
This is possible using an easy process of implementing a script that allows you to disable right click feature on your blog. This script blocks right click menu when your visitors on these pages try to use it, a user friendly message shows (You can customize your message)
Steps to implement the script-
You are require to install an easy script in body tag of your website or on specific posts or pages where you want privacy and security. This script go just right before </body> tag on your website.
Go to HTML of your website and add the script just before the closing body tag </body>
<script type=”text/javascript”>
var message=”Right Click Menu is Not Allowed!“;
function clickIE4(){
if (event.button==2){
return false;
function clickNS4(e){
if (document.layers||document.getElementById&amp;&amp;!document.all){
if (e.which==2||e.which==3){
return false;
if (document.layers){
else if (document.all&amp;&amp;!document.getElementById){
document.oncontextmenu=new Function(“alert(message);return false&quot;)
||| – Customize Message
Here you can make changes with your message to your visitor by replacing “Right Click Menu is Not Allowed!
Credits-  The credits of serving this utility “The right click disabled menu” goes to designers at
How to Implement the script on Specific pages And URLs- Read This

2. Disable Text Selection –

The above given way of disabling right click menu could harm reputation of website, cause its going to be an irritating and annoying experience for your visitors, implementing the feature some pages helps you in taking care of sensitive content from content scrappers however its not a best choice if you are planning to implement this on your whole-

How to disable Text Selection

Your blog should not be irritating and buggy experience for you visitors, this is the reason am popped up for the another scenario of saving you content from being copied, so here is the best alternative choice available for you “Disable Text Selection


Go to HTML body of your site via template from edit layout option-

and paste the code just before the </head> given below-

<script type=”text/javascript”>

* Prevent Text Selection code- © Dynamic Drive DHTML code library (
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at for full source code

function disableSelection(target){
if (typeof target.onselectstart!=”undefined”) //IE route
target.onselectstart=function(){return false}
else if (typeof!=”undefined”) //Firefox route”none”
else //All other route (ie: Opera)
target.onmousedown=function(){return false} = “default”



||| – document.body = By customizing this code you can specify the elements for restriction, the default code will help you restricting users from copying your content site wide but if you wish to make it on specific location, portion or only some part of you content you can do this by customizing-

Here you need to replace this with

document.getElementById(“[Division Id]“)

[Division Id] give reference to div ID here


i.e: Assume, the div you want to select for restriction is


<div id=”Paragraph“>
<p>Put the text that you wish to disable here</p>
<img src=”DisableImage.jpg” alt=”Text Selection”/>

Reference would be-


Posted by on July 4, 2013 in Others


27 responses to “How to Disable Text Selection on Your Website- Restrict Users from Copying Your WEB Content

  1. bath bomb cupcake

    July 5, 2013 at 6:58 pm

    I have been browsing on-line greater than three hours lately,
    but I never found any interesting article like
    yours. It is beautiful value sufficient for me.
    Personally, if all web owners and bloggers made excellent
    content material as you probably did, the web shall be a lot more useful than ever before.

  2. scented oils

    July 8, 2013 at 7:12 pm

    I feel this is one of the such a lot important info for me.
    And i’m satisfied reading your article. But want to commentary on few common issues, The site style is ideal, the articles is actually great : D. Good job, cheers

  3. wooden kids play kitchens

    July 8, 2013 at 7:56 pm

    Thanks for the auspicious writeup. It in reality was once a enjoyment account it.

    Glance advanced to far added agreeable from you! However, how could we be in contact?

  4. incense world

    July 9, 2013 at 10:33 am

    Very soon this web page will be famous amid all blog visitors, due to it’s nice posts

  5. buy incense

    July 9, 2013 at 3:31 pm

    Do you mind if I quote a few of your posts as long as I provide credit and sources back to your webpage?
    My blog is in the exact same niche as yours and my users would genuinely benefit from a lot of the information you provide here.

    Please let me know if this okay with you. Thank you!

  6. home improvement stores

    July 9, 2013 at 3:57 pm

    Having read this I thought it was really enlightening.
    I appreciate you finding the time and energy to put this content together.

    I once again find myself personally spending way too much time both reading and posting comments.

    But so what, it was still worth it!

  7. incense and peppermints strawberry alarm clock 1967

    July 10, 2013 at 2:17 am

    This post gives clear idea in support of the new
    users of blogging, that actually how to do
    running a blog.

  8. nyc party venues

    July 10, 2013 at 2:48 am

    When someone writes an piece of writing he/she keeps the image of a user in his/her mind that how a
    user can understand it. Therefore that’s why this post is amazing. Thanks!

  9. Kristie

    July 10, 2013 at 1:24 pm

    Thanks for sharing your thoughts. I really appreciate your efforts and I am waiting for your further post
    thank you once again.

  10. bath bomb factory

    July 13, 2013 at 2:06 pm

    Usually I don’t learn post on blogs, but I wish to say that this write-up very forced me to take a look at and do so! Your writing taste has been surprised me. Thanks, quite great article.

  11. wholesale incense sticks

    July 13, 2013 at 3:14 pm

    Right here is the perfect site for anyone who wants to find out about this topic.

    You realize a whole lot its almost tough to argue with you
    (not that I really will need to…HaHa). You certainly put a new spin
    on a subject that has been written about for a long time.

    Excellent stuff, just great!

  12. soap Selling

    July 13, 2013 at 5:33 pm

    Saved as a favorite, I really like your site!

  13. easy soap Making

    July 13, 2013 at 8:36 pm

    You should be a part of a contest for one of the
    best sites on the internet. I most certainly will recommend this blog!

  14. your friends

    July 13, 2013 at 10:16 pm

    Thanks to my father who shared with me concerning this weblog, this blog
    is truly awesome.

  15. nag champa incense sticks

    July 13, 2013 at 11:18 pm

    It’s awesome for me to have a web site, which is beneficial in support of my know-how. thanks admin

  16. mosquito repellent incense sticks

    July 14, 2013 at 11:07 am

    When someone writes an paragraph he/she maintains the plan of a
    user in his/her brain that how a user can be aware of it.
    Thus that’s why this post is perfect. Thanks!

  17. Selling kitchens Online

    July 14, 2013 at 2:59 pm

    Hi there! This is kind of off topic but I need some guidance from an established blog.

    Is it very hard to set up your own blog? I’m not very techincal but I can figure things out pretty fast. I’m thinking about making
    my own but I’m not sure where to begin. Do you have any points or suggestions? Many thanks

  18. kitchen Designs

    July 23, 2013 at 9:08 pm

    Do you mind if I quote a few of your posts as long as I provide credit and sources back to your blog?
    My blog is in the very same area of interest
    as yours and my visitors would definitely benefit from some of the information you provide here.
    Please let me know if this okay with you.

  19. Birthday party ideas

    July 29, 2013 at 2:13 pm

    Hello, the whole thing is going sound here and ofcourse every
    one is sharing information, that’s truly fine, keep up writing.

  20. Pamper party ideas for women

    July 30, 2013 at 11:06 pm

    Pretty portion of content. I simply stumbled
    upon your web site and in accession capital to claim that I get in fact enjoyed account your weblog posts.
    Any way I will be subscribing for your augment or
    even I success you access consistently fast.


    July 31, 2013 at 6:25 pm

    Hello, i believe that i noticed you visited
    my website thus i came to return the prefer?.I am attempting to find issues
    to improve my website!I guess its ok to make use of some of
    your concepts!!

  22. Home Improvements That Waste Money

    August 1, 2013 at 10:49 am

    Hi there, I read your blogs like every week.

    Your writing style is awesome, keep it up!

  23. christmas log cabin incense burner

    August 2, 2013 at 1:59 pm

    Thanks in favor of sharing such a good thinking, piece
    of writing is good, thats why i have read it completely


    August 2, 2013 at 4:18 pm

    Hi it’s me, I am also visiting this website daily, this web site is genuinely good and the users are actually sharing good thoughts.

  25. Seedlingsites.Com

    August 2, 2013 at 9:13 pm

    Very nice article, just what I was looking for.

  26. i crave cheese

    August 3, 2013 at 1:28 am

    Ahaa, its nice conversation concerning this post here at this webpage, I have read all
    that, so at this time me also commenting here.

  27. Real estate games

    October 21, 2013 at 11:27 am

    Hello to all, as I am actually keen of reading this blog’s post to be updated regularly.
    It consists of nice material.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: