Forum Moderators: mack

Message Too Old, No Replies

will this code work...

will the use of javascript help...

         

estebones

6:48 am on Jun 30, 2003 (gmt 0)

10+ Year Member



hi everyone,
I have been looking for some sort of code that will disable certain user actions...
So I went to a certain "Hot" site with "scripts" and I found this bit of javascript:
(This tag as you can see goes within the body tag)

<body oncontextmenu="return flase" onselectstart="return false" ondragstart="returnflase">

I guess my question is: Are there any workarounds for it? I used it locally on my macine and it seems to work but will disabling javascript on the browser deem this useless? I realize that by putting stuff on the web i am opening myself for theft of content, graphics etc.. but i'd like to do as much as possible to prevent it.
thanks in advance..

--esteban

waldemar

1:00 pm on Jun 30, 2003 (gmt 0)

10+ Year Member



will disabling javascript on the browser deem this useless?

Yes.
I wouldn't rely on those "hacks" to protect content. Aside from annoying users ("Hey, where is the context menu?") these tags won't work in every browser. Instead, place (c) symbols in your graphics (and watermark them).

g1smd

8:11 pm on Jun 30, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Good advice. Do something to the images themselves. Don't try to second-guess all the ways that people might try to get to those images. Let the users have full access to them, but embed a digital watermark, site logo or graphic, and/or copyright notice in all of them instead.

too much information

12:29 pm on Jul 1, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



estebones I feel your pain! and although you can't prevent everything, there are a few things you can do which are very effective. (If used all at once) Keep in mind that these tricks work great for IE6, but are less effective on other browsers. I've been having fun with this problem for a while, it's becoming a hobbie.

This META tag will block the toolbar in IE6:
<meta http-equiv='imagetoolbar' content='no'>

This script will block the content menu from poping up on a right-click, but like you said, if JavaScript is disabled...
<SCRIPT language='JavaScript' type='text/JavaScript'>
<!--
function click(e)
{
if (document.all)
if (event.button == 2)
return false;
if(document.layers)
if (e.which == 3)
return false;
}
function click2()
{
event.returnValue=false;
return false;
}
if (document.layers)
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=click;
document.oncontextmenu=click2;
// -->
</SCRIPT>

Stop browser cache (this one's tricky):
<meta http-equiv='Pragma' content='no-cache'>
<meta http-equiv='Expires' content='-1'>
The trick is that you have to do it again at the bottom of the page because you can't clear the cache unless there is something in it:
...
</body>
<head>
<meta http-equiv='Pragma' content='no-cache'>
<meta http-equiv='Expires' content='-1'>
</head>
</html>

I have a few other tricks in ASP, mainly redirects for people who try to bookmark and "Make available offline" for the site, and using <frame src=""> to call a script to load the image which was really tough.

Anyway, have fun trying to protect those images. I'm finding that there are fewer people trying to download than you think, and taking simple steps to slow them down usually stops them all together.

TMI

g1smd

10:49 pm on Jul 1, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Umm, putting a second <head> section in after the <body> is not valid HTML.

And, that instruction is not clearing the cache, it is saying "don't put it in there" in the first place.

I think your logic is flawed somewhere.

estebones

2:43 am on Jul 4, 2003 (gmt 0)

10+ Year Member



thanks,
I don't have much graphical content on my site and it's nothing amazing but I just don't think is right that just about anyone can go in there and take the fruits of my hard work...
Once again thanks to all.

--este