Forum Moderators: open
Why would you want it on your site?
You can't hide a thing with it, and it will certainly annoy users that they won't be able to use that button and the popup menu. There are a lot of usefull options in there.
If I come to a site wich blocks the right mouse button, chances are quite big that I won't come back!
So why do you want it on your site? (it can be usefull sometimes, I know that too...)
I think ill use this 1... I doesn't give you an annoying pop up window... it just disables the menu...
The reason why i wanted it is because there are a couple of pages on my website that i didnt want a certian someone to veiw the source code of... mainly because he has stolen my layout and made it his own lol. I dont want it for the whole website becasue i have pictures of my band and MP3's that i want ppl to have.
Thanks
Martin
1 Have a secure logon to your site so only known users can get access. Make them agree to Terms of Service so you'll get oodles of compensation off them if they use right click.
2. Have a secure logon and, as part of the signup procedure download a special purpose browser or a modified mouse driver. Only allow access if these are in use.
These are both simple ways to reduce your user population to those who will adopt your access requirements.
1. Have a secure logon to your site so only known users can get access. Make them agree to Terms of Service so you'll get oodles of compensation off them if they use right click.
2. Have a secure logon and, as part of the signup procedure download a special purpose browser or a modified mouse driver. Only allow access if these are in use.
Heh... Workable and ludicrous respectively ;-) I guess that's one way of reducing your user base to nothing.
When you transmit data to a browser, it is plainly available to the user. Even SSL only encrypts at the transport level, and that means that any user can examine your source code. Moreover, some modern browsers, such as Mozilla Firefox, actually come with a built in DOM Inspector that is used to analyse page structure where it is not clear from the source. You're wasting your time with technical solutions for HTML content.
You have three options:
1) Write the site using a plugin that protects content. Flash might be a possibility. Bear in mind that increasing technical complexity decreases reliability and target audience.
2) Make your content dynamic. There's little you can do in terms of protecting general page structure, but if your page content changes frequently and contains strong ties to your domain, it'll be more difficult to rip off your content.
3) Legal action. This is the easiest to implement, but the hardest to enforce. You can't copyright something as basic as page layout.
My conclusion: Get over it.
There are one or two good reasons for using the no right mouse click javascript though which often get overlooked.
For instance, if you have a number of large scale original photos on your site. You can't stop people taking those files and uploading them onto their own site. If you're on a windows server, as far as I know, you can't even stop people from using up your bandwidth by creating a live link to the image on your site from their site (if they're determined they'll figure out the filepath eventually).
However you can stop those who don't know any better from linking directly to an image on your site accidentally. Chances are if a webmaster is determined to copy a large photo or image and it only ever appears in a window without a menu and the right-click is disabled and they _still_ know how to find the filepath... they probably know enough about the web to make their own copy of the photo rather than pulling it directly off your site. (Malicious intent notwithstanding).
How I wish my site was hosted on an apache server
^ or Opera users can press Ctrl+F3 to view source.
And Mozilla users can press Ctrl+U
...and ie5 users can try and view source, get annoyed when it won't work, try and remember if they need to clear out their temporary internet files or something, then switch to another browser...
[/end slightly off-topic rant]
There is no effective way of stopping someone who really wants access to your content (aside of simply not putting it online) - there will always be a way of getting to it whether it is html, jpeg, flash, pdf or whatever.
I use one on a site I did for my daughter, who does art quilts worth thousands of dollars; and on another site where an artist of some note allowed me to set up a "gallery" of her paintings of horses and unicorns. Of course people who are 'net savvy would still be able to get the graphics - one can only hope that most of them won't because they get the nicely-phrased "please don't" alert message and are just content with looking from then on.
Until everyone in this world is fully ready to not only acknowledge but protect copyright, anything placed in 'netspace will be vulnerable. The script I use does NOT prevent anyone but the honest from obtaining the information and/or graphics....
[I have a lot of interest in this sort of thing: I not only design and run sites, I write fantasy, sci-fi, and romance - copyright is an EXTREMELY important concept for me, as well as a vital part of my "business situation".)