Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Copying Web Page Content - Disable

Reply
Thread Tools

Copying Web Page Content - Disable

 
 
Matt
Guest
Posts: n/a
 
      05-09-2005
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.

 
Reply With Quote
 
 
 
 
RobB
Guest
Posts: n/a
 
      05-09-2005
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.

 
Reply With Quote
 
 
 
 
Randy Webb
Guest
Posts: n/a
 
      05-09-2005
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
 
Reply With Quote
 
Richard Cornford
Guest
Posts: n/a
 
      05-09-2005
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.


 
Reply With Quote
 
kaeli
Guest
Posts: n/a
 
      05-09-2005
In article <(E-Mail Removed) .com>,
http://www.velocityreviews.com/forums/(E-Mail Removed) 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

 
Reply With Quote
 
askMe
Guest
Posts: n/a
 
      05-10-2005
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

 
Reply With Quote
 
Randy Webb
Guest
Posts: n/a
 
      05-10-2005
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
 
Reply With Quote
 
Lasse Reichstein Nielsen
Guest
Posts: n/a
 
      05-10-2005
"askMe" <(E-Mail Removed)> 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 - (E-Mail Removed)
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
 
Reply With Quote
 
askMe
Guest
Posts: n/a
 
      05-11-2005

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

 
Reply With Quote
 
askMe
Guest
Posts: n/a
 
      05-11-2005
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error: Only Content controls are allowed directly in a content page that contains Content controls. hazz ASP .Net 6 06-09-2010 01:54 PM
document.getElementById(), error in content page content page Dave L ASP .Net 3 03-04-2010 08:50 AM
how to disable WMP from loading a preview of a file in Explorer.. without disabling Web Content? Michael Branchfield Computer Support 2 07-17-2006 01:56 AM
limit on number of content placeholders(which are editable in content pages) in master page nemesis.saurabh@gmail.com ASP .Net 0 05-25-2006 04:44 AM
Error: "Content controls can only be used in a content page" J.Edwards ASP .Net 0 01-20-2006 11:43 AM



Advertisments