If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 7 of 7
  1. #1
    Join Date
    May 2005
    Rochester, NY
    Member #

    Odd anybody aware of a CSS attribute to make text uncopyable (I know I made that word up)?

    Essentially I have a client who does not want any of his content to be able to be highlighted and copied. I know there is JS code that disables the right mouse menu but you can still use keyboard commands. I also hate to make it images since it would be unindexable (I probably made that up as well). Somebody told me I might be able to accomplish this through CSS.

    Thanks in advance,
    michael murphy
    Professional Web Development


  3. #2
    Senior Member Fallout's Avatar
    Join Date
    Aug 2003
    Richmond, Virginia
    Member #
    Images are your only solution, and even then there are image-to-text applications out there. I would try to do an image in the background of an element with an alt tag that has the correct text. Someone can still just look at the source to get the text, but that same person would find another way to do it (ie. the app I mentioned) to get the text anyway. Thus you save some search engine recognition without losing any more text than you would with just a straight image.

  4. #3
    Senior Member
    Join Date
    Aug 2003
    Member #
    The only way would be to use super locked-down PDF files, blocking printing, copy/pasting, and even adding DRM. I don't know how to do it, but such PDFs exist because they annoy me constantly: some academic journals think it's good to stop researchers from copying text from and printing journal papers. Most of the time you would copy a phrase to Google them.

    One tip as a user though: Do not do this. Although I'm not familiar with your client or their thinking, is their reason that good? Further, any technology you use will be broken by those who really want to break it. In effect, you will be just annoying the great majority of your users.

    By the way, even if a way exists to do it with CSS, people can simply disable CSS. Likewise for JS.

    Just my thoughts. Ignore/accept as you will.
    eKstreme - Free website tools!
    fontfox - free fonts Hand-picked quality fonts.

  5. #4
    Senior Member
    Join Date
    May 2003
    Member #
    I found a way in JavaScript, not really 100%.

    What I do is give the text that you want to copy-protect a onClick event, which then sets focus to a hidden form field (the highlight color goes away therefore the text is not highlighted.

    I will be interested to see what others come up with, if nothing I will post mine if you like.

  6. #5
    Senior Member audiofreak9's Avatar
    Join Date
    Apr 2005
    Member #
    Quote Originally Posted by bfsog
    I found a way in JavaScript,...
    Would just need to turn javascripting off, and all the text is ready to copy.
    I guess that's why you said:
    Quote Originally Posted by bfsog
    ...not really 100%...
    As posted prior PDF format your best bet, but by no means hard to steal from either.

  7. #6
    Senior Member Rince's Avatar
    Join Date
    Nov 2004
    Member #
    There is no way to 100% secure your copy. If someone wants to steal it then they will - even if they have to retype it. Whatever method you come up of restricting people form copying your text, will also restrict people form using you web site. I recon it's almost guaranteed that the time spent "securing" the page will vastly exeed the time required to crack your security.

    Even bfsog's cluver focus change onclick could be easily defeated by a quick File - Save As, Edit - Select All, File - Print or View - source. Then we have programs that can be used to download entire web sites at a time and steal every single file. There is nothing you can do to stop this.

    If you data is important - don't put it on the web.

  8. #7
    Senior Member tha_Gsheep's Avatar
    Join Date
    Feb 2003
    Member #
    The information is on the web to be accessed by everyone, otherwise it would be in private premises. I appreciate your dilemma as I have found myself in it also but the best way through it is to sit down and consider how to explain to your client the nature of the web and put their mind at ease a little.

    Interestingly enough I stumbled across a way using CSS to make content inaccessible to internet explorer user. I'm still not completely sure why it is though I reckon its probably to do with a div 'covering' the content as if using the a z-axis but not. It happens inadvertently here: but I wouldn't bother trying to find it in the code, its an absolute midden.

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search tags for this page

how to make text uncopyable css

how to make text uncopyable in html
uncopyable image code
Click on a term to search for related topics.
All times are GMT -6. The time now is 06:18 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: