Rightclick/viewsource disabling HTML
Started by
thetruenash
, Jan 25 2006 09:54 PM
#1
Posted 25 January 2006 - 09:54 PM
#2
Posted 25 January 2006 - 10:56 PM
hey there,
as far as i know jscript is the only way.... perhaps someone else knows another way
as far as i know jscript is the only way.... perhaps someone else knows another way
#3
Posted 26 January 2006 - 12:06 PM
I'm not aware of any methods to do what you want apart from using JavaScript.
You haven't indicated why you want to do this, but typically disabling right clicking is done to prevent visitors from copying your images. If this is your ultimate aim, you're out of luck - if somebody wants to take a peek at your code OR download your images, there are a number of ways that they can do this - even if you HAVE disabled right clicking.
That being said, check out this interesting article: Protecting Your Images on the Web
Read particularly the section titled Disabling Right Click Saving of your Images without Java. (yes, the author seems to interchange Java and JavaScript frequently!)
The author demonstrates a technique to fool visitors into thinking that they're downloading your images via right clicking, but they actually download a transparent gif that covers the original image. Again, this will not stop a determined attempt to grab your images or code, but it DOES display a level of creativity as workarounds go.
If I may offer an opinion, it's not worth the effort to try and protect your code and/or images - there are simply no fool-proof ways of doing this. It's a risk that every web designer takes - putting a ton of effort into creating good clean, workable code or eye-popping, creative images, only to have someone copy in a few seconds what took you days or weeks of brain-power to create! Two thoughts may put this into perspective, though: first, the chances that you'll ever know about this being done are practically nil (agreed, that absolutely does not make it right), and second, no one can take away from you the fact that YOU were the creative one who did the work.
You haven't indicated why you want to do this, but typically disabling right clicking is done to prevent visitors from copying your images. If this is your ultimate aim, you're out of luck - if somebody wants to take a peek at your code OR download your images, there are a number of ways that they can do this - even if you HAVE disabled right clicking.
That being said, check out this interesting article: Protecting Your Images on the Web
Read particularly the section titled Disabling Right Click Saving of your Images without Java. (yes, the author seems to interchange Java and JavaScript frequently!)
The author demonstrates a technique to fool visitors into thinking that they're downloading your images via right clicking, but they actually download a transparent gif that covers the original image. Again, this will not stop a determined attempt to grab your images or code, but it DOES display a level of creativity as workarounds go.
If I may offer an opinion, it's not worth the effort to try and protect your code and/or images - there are simply no fool-proof ways of doing this. It's a risk that every web designer takes - putting a ton of effort into creating good clean, workable code or eye-popping, creative images, only to have someone copy in a few seconds what took you days or weeks of brain-power to create! Two thoughts may put this into perspective, though: first, the chances that you'll ever know about this being done are practically nil (agreed, that absolutely does not make it right), and second, no one can take away from you the fact that YOU were the creative one who did the work.
Similar Topics
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users