Disable right-click answer

4 views
Skip to first unread message

Tara Whitie

unread,
Aug 10, 2015, 2:12:23 AM8/10/15
to web-design...@googlegroups.com
Hi all

I have answered my own question....super easy and it works, just add this inside the body.

 <body oncontextmenu="return false;">

WOOHOO!!!


Kind regards

Tara Whitie
:: 02 4784 1163
:: 0449 684 588
:: http://tarawhitie.com/

Harris Ingram

unread,
Aug 10, 2015, 6:09:07 AM8/10/15
to web-design...@googlegroups.com
Hi Tara,

If I remember correctly that does not necessarily work across all browsers and no matter what there are ways to get around it so don't be to dependent on it. One piece of advice is that while most browsers will save img tags when the html page is saved they will ignore background images.

There was one interesting trick I found a few years ago.
  1. Create a transparent image, give it a unique name (something so as that it is not obvious what it is).
  2. Use that image in an img tag.
  3. Then use your real image as a background image attached to the image tag.
Most when they try to save images they will use the save image as option without realising that it is not what they are truly after.


Another way to mess with most browsers is instead of having an image file to actually embed it in the css or html as a data uri:


https://css-tricks.com/data-uris/
http://jpillora.com/base64-encoder/


Honestly, industry practice is to discourage active image protection as there is no way to truly protect something that is viewable on the screen. I work with a lot of artists and photographers and the only thing we can tell them is just keep the uploaded image low resolution and possibly water marked so as if they are abused they are not the best quality.


Hope this helps expand your idea.


Warm Regards,
Harris Ingram
Web Developer

 


From: madblon...@hotmail.com
To: web-design...@googlegroups.com
Subject: [webdesign] Disable right-click answer
Date: Mon, 10 Aug 2015 16:12:21 +1000
--
You received this message because you are subscribed to the Google Groups "Web Designers Blue Mountains TAFE" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web-designers-bm...@googlegroups.com.
To post to this group, send email to web-design...@googlegroups.com.
Visit this group at http://groups.google.com/group/web-designers-bmtafe.
For more options, visit https://groups.google.com/d/optout.

Tara Whitie

unread,
Aug 10, 2015, 6:43:20 AM8/10/15
to web-design...@googlegroups.com

Hi Harris

The client is happy with the result I achieved  <body oncontextmenu="return false;"> I haven't tested it across all browsers as it was a quick fix to satisfy the client on an immediate request..lol.....as all things are done in 5 minutes hahaha.... and thanks for the reply I'll investigate further...


Kind regards

Tara Whitie
:: 02 4784 1163
:: 0449 684 588
:: http://tarawhitie.com/




From: harris...@hotmail.com
To: web-design...@googlegroups.com
Subject: RE: [webdesign] Disable right-click answer
Date: Mon, 10 Aug 2015 20:09:06 +1000
Reply all
Reply to author
Forward
0 new messages