Firefox browser - prevent copying of text on page

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

Firefox browser - prevent copying of text on page

Post by sparkle1 »

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
User avatar
Gingerbread_Man
Posts: 470
Joined: October 5th, 2004, 6:28 pm

Post by Gingerbread_Man »

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

Firefox Browser - prevent copying of text on page

Post by sparkle1 »

Thank you - I'll give to my web developer to try :)
Dunderklumpen
Posts: 16224
Joined: March 9th, 2003, 8:12 am

Re: Firefox Browser - prevent copying of text on page

Post by Dunderklumpen »

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 by dizzie »

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.
User avatar
polidobj
Posts: 3147
Joined: March 31st, 2004, 9:10 am
Location: Maryland USA - im in ur tinderbox, crashtesting ur firefox

Post by polidobj »

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
User avatar
idbehold
Posts: 476
Joined: August 7th, 2004, 10:45 pm

Post by idbehold »

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
Contact:

Post by dtobias »

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 by sparkle1 »

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 by Dunderklumpen »

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.
User avatar
Gingerbread_Man
Posts: 470
Joined: October 5th, 2004, 6:28 pm

Post by Gingerbread_Man »

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 by Dan Soper »

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.
User avatar
jqp
Posts: 5070
Joined: November 17th, 2004, 10:56 am
Location: In a box
Contact:

Post by jqp »

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.
User avatar
dstarfire
Posts: 90
Joined: August 17th, 2004, 3:20 pm

Post by dstarfire »

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
Contact:

Post by bijugc »

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
Post Reply