disable copy paste

G

Guest

I want to know how to disable the function copy in a html page in order to
protect some document of copying

Thanks
 
S

Steve Pugh

I want to know how to disable the function copy in a html page in order to
protect some document of copying

Short answer:
You can't.

Long answer:
You can't.

If you want to prevent copying of a document, then don't place it on
a web server in the first place. That's the only way to ensure that no
one can copy it.

In some buggy browsers applying align to some elements (e.g. tables)
makes it impossible to select the text inside that element. But the
page can still be saved.

With JavaScript you can try to muck about with the browser
functionality (disabling the right click, etc.) but you can't do
anything that can't be circumvented.

When a browser receives a page from your server it stores a copy of
that page on the user's computer. Once the file is there it can be
accessed like any other file.

Even if you turn all your text into a graphic and screw search engines
and the users with visual disabilities by not supplying an alt text
the user can still run that graphic through and OCR program. Or they
can just type the text out again.

Steve
 
A

A Hess

Somewhere around 12/14/03 9:17 AM, frc typed wildly with reckless abandon:
I want to know how to disable the function copy in a html page in order to
protect some document of copying

Thanks

Echoing Steve Pugh: If it's on the web, you can't. Don't even try,
you'll just make yourself look bad.

I'm using Firebird and all those js right-click capturing scripts do
nothing to me, even though I do have js enabled. I right-click and two
things pop up: 1. An "alert" saying that I can't right click the page,
and 2. The right-click menu

I then laugh at the silly author who thinks that'll stop people. Don't
be that silly author.
Best regards, Aron
 
R

Richard

frc! said:
I want to know how to disable the function copy in a html page in order
to protect some document of copying

No problem. Click on File menu, click on "Save as", click save and I have
your entire web page.
Open the page in an editor and take what I want.
 
N

Nico Schuyt

frc said:
I want to know how to disable the function copy in a html page in
order to protect some document of copying

Disabling right click with <body oncontextmenu="return false"> makes it
difficult to copy the pictures.
Like the others explained, it will not work for 100% of your visitors (but
averaged 98.75% of them will be discouraged :)
Nico
 
D

David Dorward

Nico said:
Disabling right click with <body oncontextmenu="return false"> makes it
difficult to copy the pictures.
Like the others explained, it will not work for 100% of your visitors (but
averaged 98.75% of them will be discouraged :)

While anyone who tries to use the context menu to open a link in a new
window, bookmark the page, go back, go forwards, check the security, see
what cookies are set, refresh, etc, etc, etc - is likely to be rather
irritated.

And I'd like to know where you came up with that very interesting statistic
- made it up on the spot perhaps? My estimate would be much lower.
 
D

Dennis M. Marks

Nico Schuyt said:
Disabling right click with <body oncontextmenu="return false"> makes it
difficult to copy the pictures.
Like the others explained, it will not work for 100% of your visitors (but
averaged 98.75% of them will be discouraged :)
Nico

You're forgetting that it has no effect on the Mac since there is no
right click. The context menu is obtained by holding down the button,
doing an option click, or programming a two button mouse to do an
option click on the right button.
 
N

Nico Schuyt

While anyone who tries to use the context menu to open a link in a new
window, bookmark the page, go back, go forwards, check the security,
see what cookies are set, refresh, etc, etc, etc - is likely to be
rather irritated.
And I'd like to know where you came up with that very interesting
statistic - made it up on the spot perhaps? My estimate would be much
lower.

Hehehe, I was sure one of you would respond :)
About the things you mentioned like check security, see what cookies are
set, opening link in new windows, there aren't so many people (maybe even
less than the 1.25%) who even know such things are possible let alone they
know how to do it.
Most of the things you mention can be done in another way (My favourite
browser (Greenbrowser) for example, opens a link in a tabbed window on
Shift+left click)
About the irrititation you presume, I think someone who's really irritated
will very quickly find out how to avoid such problems
And, you guessed it, I made the statistic figure up on the spot. It's based
on the fact that no one I know in real life knows how to get around such a
disabling (but maybe it says only something about the intelligence of us
Dutch :)

Cheers, Nico
 
N

Nico Schuyt

You're forgetting that it has no effect on the Mac since there is no
right click. The context menu is obtained by holding down the button,
doing an option click, or programming a two button mouse to do an
option click on the right button.

I didn't forget but there are just soooo few Mac-users :)
Nico
 
D

David Dorward

Nico said:
there aren't so many people (maybe even
less than the 1.25%) who even know such things are possible let alone they
know how to do it.

Another statistic with no evidence.
Most of the things you mention can be done in another way

So? That doesn't make it any less annoying when the menu you expect to
appear doesn't.
About the irrititation you presume, I think someone who's really irritated
will very quickly find out how to avoid such problems

Really? OK then. You tell me how to stop sites from screwing up the context
menu without breaking any site which depends on JavaScript to work (i.e.
turning off JavaScript is not an option)?
 
C

Chuck

Thank you Nico
That is what i was looking for

Only that it's not what you were looking for. :) It will only make it
slightly more difficult to copy the pictures, it does nothing for the
rest of the content.

I could still circumvent those protections in about 5 seconds and
still copy your entire page. (and I use IE 5.5)

The way HTML works makes it impossible to protect your page. I often
wonder why people even bother. Even if you could allow people only to
see the website and do nothing else, what would be the benefit? The
major protection you have is copyright laws.

If you are trying to advertise something, you want them to save it for
offline viewing, assuming your product was good enough for them to
want to do so.

If you were making, say a porn site, your customers will rapidly
become irritated with you, and if they really wanted the pictures,
it's still easy enough to grab them anyway.

If you are writing something creative, frankly you aren't talented
enough to concern yourself with trying to protect it. If you were you
would be published in print, and then OCR-ed.

The bottom line if you try to protect your stuff too much, people will
try that much harder to take it and put it up somewhere else, just for
the challenge. (or because you cheesed them off.)

I guess, I got a little carried away, it's just so sad when I see some
webpage with truly horrible Dragon Ball Z slash, protected with one of
those cheesy JavaScript right click protections. It says something
about who wrote it and those it's designed for, and it's not something
good. I guess, that would probably protect it from it's target
audience though.

-Chuck. (www.wormspeaker.com)
_____________________________________________________
Spread love and understanding...
but don't be afraid to bloody your knuckles doing it.
-Alex Ross
 
N

Nico Schuyt

Another statistic with no evidence.

Right :)
But an answer "You can't" to the question "how can I prevent copying"
probably is a worse reflection of statistics.
So? That doesn't make it any less annoying when the menu you expect to
appear doesn't.

Not for me. You simply can't prevent people to use this technique. It fact
it even gives me some satisfaction I know how to get around it :)
Really? OK then. You tell me how to stop sites from screwing up the
context menu without breaking any site which depends on JavaScript to
work (i.e. turning off JavaScript is not an option)?

Well, there are alternative ways for things like opening a link in a new
window, bookmarking, back, forward or refresh. (Even I never noticed that
back and forward are options in the context menu :)
Nico
 
B

brucie

Disabling right click with <body oncontextmenu="return false"> makes it
difficult
bullshit

to copy the pictures.

left click on the image and drag it into the browser address bar or
graphics program or whatever.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,522
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top