MozillaZine

Firefox browser - prevent copying of text on page

Discussion of features in Mozilla Firefox
sparkle1
 
Posts: 6
Joined: November 21st, 2004, 6:46 pm

Post Posted November 21st, 2004, 6:55 pm

Hi,

I have had a website created in Cold Fusion with some HTML.
I asked my website developer (who does not use Friefox), to create code to prevent copying of text on my pages. This works successfully in Internet Explorer, as you can't hold down your mouse and copy text.

However, I have noticed that in Firefox 1.0, I can click on Edit, Select all, and copy my entire pages of text (and banners and buttons).

Does anyone know of code that has been developed to prevent this?

Thanks,

Sparkle1

Gingerbread_Man

User avatar
 
Posts: 470
Joined: October 5th, 2004, 6:28 pm

Post Posted November 21st, 2004, 7:21 pm

It's the same old issue of IE-only scripts. It's not Firefox that's refusing to run a proper script.
This script from DynamicDrive will work properly.
Gingerbread Man's posts, 2004-10-06 through 2005-08-12.

sparkle1
 
Posts: 6
Joined: November 21st, 2004, 6:46 pm

Post Posted November 21st, 2004, 7:42 pm

Thank you - I'll give to my web developer to try :)

Dunderklumpen
 
Posts: 16224
Joined: March 9th, 2003, 8:12 am

Post Posted November 22nd, 2004, 3:08 am

sparkle1 wrote:Thank you - I'll give to my web developer to try :)


Why are you trying to prevent people to do that?

dizzie
 
Posts: 1
Joined: November 22nd, 2004, 5:43 am

Post Posted November 22nd, 2004, 6:03 am

I'd like to point out that this page works properly (i.e. you can select what you like) if javascript is turned off after you navigate to the page. And if you're too lazy to do that, ctrl-a, ctrl-c allows you to select text. And that messing with my browsers features will always make me try to defeat the script whether I need the content or not.

polidobj

User avatar
 
Posts: 3144
Joined: March 31st, 2004, 9:10 am
Location: Maryland USA - im in ur tinderbox, crashtesting ur firefox

Post Posted November 22nd, 2004, 9:09 am

Also caret browsing can be used to select text to get by that script.
Brian J Polidoro - Today's bugs brought to you by Raid. :P
Windows7 - Firefox user since ~Feb 2002

idbehold

User avatar
 
Posts: 476
Joined: August 7th, 2004, 10:45 pm

Post Posted November 22nd, 2004, 9:13 am

or you could just look at the source, if you are going to prevent me from doing something, im just gonna want to do it more =)
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b1pre) Gecko/20080911020314 Minefield/3.1b1pre

dtobias
 
Posts: 2098
Joined: November 9th, 2002, 3:35 pm
Location: Boca Raton, FL

Post Posted November 22nd, 2004, 11:22 am

Can somebody program Firefox to go out and kill (preferably in a slow and painful manner) developers who try to make sites do annoying things like disabling right-click options, and the bosses who order them to do stuff like that?
Dan's Web Tips: http://webtips.dan.info/
Dan's Domain Site: http://domains.dan.info/
Dan's Mail Format Site: http://mailformat.dan.info/

sparkle1
 
Posts: 6
Joined: November 21st, 2004, 6:46 pm

Post Posted November 22nd, 2004, 12:43 pm

I'm trying to stop people because I found that a number of other sites were taking my test that I had written, as opposed to just linking to my site.

Dunderklumpen
 
Posts: 16224
Joined: March 9th, 2003, 8:12 am

Post Posted November 22nd, 2004, 2:01 pm

sparkle1 wrote:I'm trying to stop people because I found that a number of other sites were taking my test that I had written, as opposed to just linking to my site.


The simple and basic rule is - if you do not want other people to copy/steal/borrow stuff - do not publish them on the internet.

Switching functions off in visitors browser is very annoying - and mind you - Mozilla can block such scripts.

Gingerbread_Man

User avatar
 
Posts: 470
Joined: October 5th, 2004, 6:28 pm

Post Posted November 22nd, 2004, 3:03 pm

Mozilla doesn't block them, it can turn them off. So can IE, and presumably every other browser. This can be prevented by preventing the page from loading if JavaScript is disabled. But as it has been pointed out above, there are ways around that too, if people really want to copy the text.
Gingerbread Man's posts, 2004-10-06 through 2005-08-12.

Dan Soper
 
Posts: 122
Joined: May 5th, 2004, 2:58 pm

Post Posted November 22nd, 2004, 4:21 pm

It is indeed true that you cannot prevent the content of any web-page from being copied by a determined enough individual.


Amongst the ways you can make it more difficult, however, are:

Javascript to disable the context menu
JS may also be able to de-select any selections on mouse-up(?).

Or you could put the stuff you want to copy-protect into a java applet, or use flash for it.

Or you could put an empty DIV on top of your content (by means of CSS absolute positioning), so that any attempt to click and drag to select text would instead be trying to select the contents of the covering DIV.


None of these is fool-proof, of course. JS and CSS methods can be defeated by turning off JS and/or copying form the page source; the Flash and Java methods can be used against you by the thief taking the applet itself. Defeating the JS methods can be made more difficult by using JS to "create" the HMTL code with lots of document.write instructions, but someone will figure a way around it.

jqp

User avatar
 
Posts: 5070
Joined: November 17th, 2004, 10:56 am
Location: In a box

Post Posted November 22nd, 2004, 4:26 pm

The whole point of getting Firefox is to be able to have the option of not letting JavaScript do stupid things like disable context menus or stop me from selecting something. If someone wants something, they're going to get it. When someone visits a page on your site, that page gets copied to a cache on the person's computer. All I have to do is go to that file in the cache and do whatever I want with it. Or disable javascript... then do whatever I want with it.

dstarfire

User avatar
 
Posts: 90
Joined: August 17th, 2004, 3:20 pm

Post Posted November 22nd, 2004, 7:50 pm

Firefox, unlike all MS products, is written for the user, not for website developers.

If the day ever comes when users want to lose their ability to copy and paste text from a site, then it'll probably be added to firefox, but not until.

Most users expectation is that if they can see it on their screen, they can save for later use or editing.

BTW. one easy to discourage stealing of text is to put in a pdf, or even better (or worse, depending on your perspective) in an image. It's not foolproof, it just makes it a LOT harder for flks to steal your text.

bijugc
 
Posts: 399
Joined: March 18th, 2003, 9:52 pm

Post Posted November 22nd, 2004, 9:22 pm

sparkle1,

Flash, PDF, java, jpg or any other thing you use still people can copy stuff by just using the software coming with scanners to read charcters from image.
There are many products that claims to protect the content of a web page by encripting it. All are giving a false hope even with IE you can still select contents. Even you can read the javascript running it.
Or one can ask somebody in thirdworld to retype the page content for less than 10 cents.

So better way is to allow coping, but ask to give credit to you work by displaying you name, copyright info, link to your site etc. Trust me you will get more referrals that way.
8) Biju
MacroEditor | http://QuickTools.MozDev.org | Edit files inside ZIP,JAR,XPI http://7-Zip.org
Cure Cancer http://www.grid.org/about | GNOME,*nix on MSWin32 http://CyGNOME.sf.net

Return to Firefox Features


Who is online

Users browsing this forum: No registered users and 1 guest