Copying Web Page Content - Disable

Discussion in 'Javascript' started by Matt, May 9, 2005.

  1. Matt

    Matt Guest

    When browsing a web page a user has the ability to highlight content on
    a page (by holding down the left mouse button and dragging the mouse
    over the desired content). Is there a way to disable this option? I
    assume there isn't but I have to try.
     
    Matt, May 9, 2005
    #1
    1. Advertising

  2. Matt

    RobB Guest

    Matt wrote:
    > When browsing a web page a user has the ability to highlight content

    on
    > a page (by holding down the left mouse button and dragging the mouse
    > over the desired content). Is there a way to disable this option? I
    > assume there isn't but I have to try.


    That sounds ominous. Anyway...

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <script type="text/javascript">

    if ('undefined' != typeof document.onselectstart)
    {
    document.onselectstart = function()
    {
    return false;
    }
    }
    else
    {
    document.onmousedown = function()
    {
    return false;
    }
    document.onmouseup = function()
    {
    return true;
    }
    }

    </script>
    </head>
    <body>
    <p>
    When browsing a web page a user has the ability to highlight content on

    a page (by holding down the left mouse button and dragging the mouse
    over the desired content). Is there a way to disable this option? I
    assume there isn't but I have to try.
    </p>
    </body>
    </html>

    Yet another chapter in the endless war against the user.
     
    RobB, May 9, 2005
    #2
    1. Advertising

  3. Matt

    Randy Webb Guest

    Matt wrote:
    > When browsing a web page a user has the ability to highlight content on
    > a page (by holding down the left mouse button and dragging the mouse
    > over the desired content). Is there a way to disable this option?


    No, but some people may lead you to believe otherwise. They may also
    lead you to believe you can disable the mouse buttons but you can't do
    that either.

    > I assume there isn't but I have to try.


    Your assumption is correct.


    --
    Randy
    comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
     
    Randy Webb, May 9, 2005
    #3
  4. Matt wrote:
    > When browsing a web page a user has the ability to
    > highlight content on a page (by holding down the left
    > mouse button and dragging the mouse over the desired
    > content). Is there a way to disable this option? I
    > assume there isn't but I have to try.


    Broadly no there is not. IE provides an - onselectstart - event that may
    be cancelled, and any browser exposing the selection itself to scripts
    should allow that selection to be cleared. Both approached are dependent
    on client-side scripting and can be disabled, either individually or by
    disabling scripting on the browser. Neither will do anything to prevent
    the copying of page content, because there are so many other ways of
    doing that anyway, drag selection is just the immediate and obvious
    approach.

    Cancelling/clearing selections can be useful for other reasons, such as
    avoiding undesirable visual artefacts while, for example, animating the
    mouse dragging of an arbitrary absolutely positioned page element as
    part of GUI.

    Richard.
     
    Richard Cornford, May 9, 2005
    #4
  5. Matt

    kaeli Guest

    In article <>,
    enlightened us with...
    > When browsing a web page a user has the ability to highlight content on
    > a page (by holding down the left mouse button and dragging the mouse
    > over the desired content). Is there a way to disable this option?


    With javascript, kinda sorta, as others have posted.
    But bear in mind that for some of us, disabling script takes one click. For
    others, two or three. ;)

    --
    --
    ~kaeli~
    Acupuncture is a jab well done.
    http://www.ipwebdesign.net/wildAtHeart
    http://www.ipwebdesign.net/kaelisSpace
     
    kaeli, May 9, 2005
    #5
  6. Matt

    askMe Guest

    In order to prevent people from copying content from your page, you
    have to turn the text into a picture (or some other peculiar object)
    which is not able to be copied the same was as text. Try to drag and
    copy a flash object or a pdf to see what I mean.

    But why do you want to prevent people from copying your text?

    http://www.askblax.com
     
    askMe, May 10, 2005
    #6
  7. Matt

    Randy Webb Guest

    askMe wrote:

    > In order to prevent people from copying content from your page, you
    > have to turn the text into a picture (or some other peculiar object)
    > which is not able to be copied the same was as text.


    That doesn't work either. If you want to prevent people from copying
    content, don't put it on the web.

    > Try to drag and copy a flash object or a pdf to see what I mean.


    File>Save As. Hmmmmm

    >
    > But why do you want to prevent people from copying your text?


    Lack of knowledge of the web, and how it works is the #1 answer to that
    question, even if people fail to realize it.

    > http://www.askblax.com


    Site not responding.

    But, if your responses in Usenet are indicative of the responses on that
    site, its better *not* to ask blax.

    Read this groups FAQ before posting, it contains a ton of useful
    information.

    --
    Randy
    comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
     
    Randy Webb, May 10, 2005
    #7
  8. "askMe" <> writes:

    > In order to prevent people from copying content from your page, you
    > have to turn the text into a picture (or some other peculiar object)
    > which is not able to be copied the same was as text. Try to drag and
    > copy a flash object or a pdf to see what I mean.


    Well, you can select text in a pdf :)

    Anyway, if people can see the content, they can also copy it, if not in
    any other way, then by rewriting it letter by letter (and screen-capturing
    images). For reasonable web pages, there are lots of simpler ways, but in
    the end, the content is not safe.

    > But why do you want to prevent people from copying your text?


    Indeed.

    This is a security question. One should never try to implement
    security without first assessing the threat it is supposed to counter.

    What is the threat from people copying text - i.e., what losses can it
    lead to. Whatever counter-measures once chooses, they should not cost
    more than the potential loss.

    /L
    --
    Lasse Reichstein Nielsen -
    DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
    'Faith without judgement merely degrades the spirit divine.'
     
    Lasse Reichstein Nielsen, May 10, 2005
    #8
  9. Matt

    askMe Guest

    Randy Webb wrote:
    > askMe wrote:
    >
    > > In order to prevent people from copying content from your page, you
    > > have to turn the text into a picture (or some other peculiar

    object)
    > > which is not able to be copied the same was as text.

    >
    > That doesn't work either. If you want to prevent people from copying
    > content, don't put it on the web.


    It works. It is why so many software companies have chosen that route.

    > > Try to drag and copy a flash object or a pdf to see what I mean.

    >
    > File>Save As. Hmmmmm


    The question was how to prevent select, cut and paste and/or
    right-clicking to save. Sure, you can save a whole web page, but the
    parts that are not text will only be saved as objects (uneditable 9x
    out of 10) which is how they were presented on the web.

    > >
    > > But why do you want to prevent people from copying your text?

    >
    > Lack of knowledge of the web, and how it works is the #1 answer to

    that
    > question, even if people fail to realize it.


    Partially correct.

    > > http://www.askblax.com

    >
    > Site not responding.


    You're obviously a very lucky person.

    > But, if your responses in Usenet are indicative of the responses on

    that
    > site, its better *not* to ask blax.


    You don't have to askblax if you don't want to. Nothing ventured,
    nothing gained.

    > Read this groups FAQ before posting, it contains a ton of useful
    > information.


    For what?

    http://www.askblax.com

    > --
    > Randy
    > comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup

    weekly
     
    askMe, May 11, 2005
    #9
  10. Matt

    askMe Guest

    If people copy your text, how is it a security question? Copying code
    maybe? Scripting on the events? Please explain.

    Thanks.

    http://www.askblax.com
     
    askMe, May 11, 2005
    #10
  11. Matt

    Mark Preston Guest

    askMe wrote:
    > Randy Webb wrote:
    >
    >>askMe wrote:
    >>
    >>>In order to prevent people from copying content from your page, you
    >>>have to turn the text into a picture (or some other peculiar object)
    >>>which is not able to be copied the same was as text.

    >>
    >>That doesn't work either. If you want to prevent people from copying
    >>content, don't put it on the web.

    >
    > It works. It is why so many software companies have chosen that route.
    >

    Nope - copy the image, feed it into your OCR and you get the text.
     
    Mark Preston, May 11, 2005
    #11
  12. Matt

    Randy Webb Guest

    askMe wrote:

    > Randy Webb wrote:
    >
    >>askMe wrote:
    >>
    >>
    >>>In order to prevent people from copying content from your page, you
    >>>have to turn the text into a picture (or some other peculiar

    >
    > object)
    >
    >>>which is not able to be copied the same was as text.

    >>
    >>That doesn't work either. If you want to prevent people from copying
    >>content, don't put it on the web.

    >
    >
    > It works. It is why so many software companies have chosen that route.


    Are you as anally retentive as you seem to be? Attempting to prevent the
    copying of *anything* on the web is a futile attempt. Its the very basis
    of the WWW to start with - *sharing* of information. But, you are
    welcome to prove me wrong. Post a (working) URL to a page, and I will
    copy/paste whatever is on it, and tell you how I did it. Even if it is
    nothing more than opening Notepad and typing it myself. It is *not* safe
    on the web.

    >
    >>> Try to drag and copy a flash object or a pdf to see what I mean.

    >>
    >>File>Save As. Hmmmmm

    >
    >
    > The question was how to prevent select, cut and paste and/or
    > right-clicking to save.


    And the answer is simple - You can NOT stop it. But again, you are
    welcome to attempt to prove me wrong.

    > Sure, you can save a whole web page, but the parts that are not text will
    > only be saved as objects (uneditable 9x out of 10) which is how they were
    > presented on the web.


    Is your knowledge of anything else better than your knowledge of the web
    and the way it works? I hope so.

    >>>But why do you want to prevent people from copying your text?

    >>
    >>Lack of knowledge of the web, and how it works is the #1 answer to that
    >>question, even if people fail to realize it.

    >
    >
    > Partially correct.


    No, totally correct.

    >
    >>>http://www.askblax.com

    >>
    >>Site not responding.

    >
    >
    > You're obviously a very lucky person.


    Irony is that you admit it. Odd.

    >
    >>But, if your responses in Usenet are indicative of the responses on that
    >>site, its better *not* to ask blax.

    >
    >
    > You don't have to askblax if you don't want to. Nothing ventured,
    > nothing gained.


    I might try later, it could provide me with some entertainment.

    --
    Randy
    comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
     
    Randy Webb, May 11, 2005
    #12
  13. Matt

    enrique Guest

    If you display your content in a Flash movie, they can't copy it.
     
    enrique, May 11, 2005
    #13
  14. enrique wrote:
    > If you display your content in a Flash movie, they
    > can't copy it.


    Unless they run the Flash movie though an example of the software
    designed to turn a SWF back into an FLA, and then use Flash to extract
    the original text. (or any of a number of alternative approaches that a
    little google searching will quickly turn up)

    Richard.
     
    Richard Cornford, May 11, 2005
    #14
  15. Matt

    kaeli Guest

    In article <>,
    enlightened us with...
    > If you display your content in a Flash movie, they can't copy it.



    LOL
    That's a good one.

    There's a big difference between "can't" and "most likely won't bother to".
    It's a bit of a pain, but it certainly IS possible.
    I have various means of getting what I want. Including an OCR program to
    extract text from graphics so I don't have to re-type it all. Exports it all
    nice into Word for me. Neat, eh? ;)

    --
    --
    ~kaeli~
    Cthulhu saves our souls and redeems them for valuable
    coupons later.
    http://www.ipwebdesign.net/wildAtHeart
    http://www.ipwebdesign.net/kaelisSpace
     
    kaeli, May 11, 2005
    #15
  16. Matt

    Randy Webb Guest

    enrique wrote:

    > If you display your content in a Flash movie, they can't copy it.


    Thanks, I needed that laugh. Flash decompiler's are a dime-a-dozen when
    you know where to look on the web.

    --
    Randy
    comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
    Answer:It destroys the order of the conversation
    Question: Why?
    Answer: Top-Posting.
    Question: Whats the most annoying thing on Usenet?
     
    Randy Webb, May 11, 2005
    #16
  17. Matt

    askMe Guest

    Mark Preston wrote:
    > askMe wrote:
    > > Randy Webb wrote:
    > >
    > >>askMe wrote:
    > >>
    > >>>In order to prevent people from copying content from your page,

    you
    > >>>have to turn the text into a picture (or some other peculiar

    object)
    > >>>which is not able to be copied the same was as text.
    > >>
    > >>That doesn't work either. If you want to prevent people from

    copying
    > >>content, don't put it on the web.

    > >
    > > It works. It is why so many software companies have chosen that

    route.
    > >

    > Nope - copy the image, feed it into your OCR and you get the text.


    True. But again, you cannot select, cut and paste. Creating the
    object deters copying. Most people will not bother to run stuff
    through OCR, reduce it to bytes, or deal with object manipulation.

    All things are possible, yes. Software companies that use objects as a
    deterrent have also *allowed* the decompilers (oh I forgot the tech
    term (but, you know what I mean, right?)), for exposure to their
    product and to enhance what their tech writers *forgot* to explain that
    might help you complete your task. Is conversion to byte code,
    modifying the extension of the output, or other manipulation of objects
    that were not designed to be *easily* copied, cut and pasted posing a
    security problem? Sandboxes getting any better, iow?
     
    askMe, May 12, 2005
    #17
  18. Matt

    askMe Guest

    >> Unless they run the Flash movie though an example of the software
    designed to turn a SWF back into an FLA, and then use Flash to extract
    the original text. (or any of a number of alternative approaches that a

    little google searching will quickly turn up)

    Richard.
    <<

    I thought even flash had a setting to prevent extraction/copying of swf
    files.
     
    askMe, May 12, 2005
    #18
  19. Matt

    askMe Guest

    >> There's a big difference between "can't" and "most likely won't
    bother to". <<

    Exactly! There is freeware abound for converting just about anything
    to anything else.
    http://www.askblax.com
     
    askMe, May 12, 2005
    #19
  20. Matt

    Mark Preston Guest

    askMe wrote:
    > Mark Preston wrote:
    >
    >>Nope - copy the image, feed it into your OCR and you get the text.

    >
    > True. But again, you cannot select, cut and paste.


    Can once you have the text. The point is to show that anything you
    *send* on the 'net can be *received* and once you have received it you
    can do what they hell yu like with it - if it is worth your time.
     
    Mark Preston, May 12, 2005
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nedu N
    Replies:
    2
    Views:
    2,206
  2. hazz
    Replies:
    6
    Views:
    50,028
    SkyUCHC
    Jun 9, 2010
  3. Mark C
    Replies:
    6
    Views:
    678
    Steve C. Orr [MCSD, MVP, CSM, ASP Insider]
    Jan 26, 2007
  4. Replies:
    1
    Views:
    294
    Thomas Fritsch
    Jun 18, 2007
  5. Dave L
    Replies:
    3
    Views:
    3,366
    Göran Andersson
    Mar 4, 2010
Loading...

Share This Page