Jump to content

Copy Protection. Code Protection


Recommended Posts

Guest zethilone
Posted

Hey,

 

How do you make it so people cant right click on your website for picture protection? And how can you make it so people cant just view your source.

 

-Thanks

-Matt

Posted

Matt,

 

Blocking the right click is done via javascript, it is however, also very easily overcome.

 

><script language="javascript">
<!--//
function press()
{if (event.button==2) {
alert('sorry, you cannot do that')}}
document.onmousedown=press
//-->
</script>

As noted above this is very very easily overcome and most people dont bother with it any more.

 

Again, source code is not protectable. There are hundreds of websites out there which claim, often for a fee, they will tell you how to stop it. All of these can be bypassed and source code taken, it just depends on how much that person wants it.

 

Sorry to sound so negative!

 

Jim

Posted

Theres a new feature in IE that goes

 

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

 

Unlike the javascript way that can be bypassed during page load this method can't. But it only works in IE so its use is limited but it stops

 

right click menu

Selecting

dragging

 

so images can't be dragged into address bar.

You can combine it however with the javaScript method without problem thus protecting your page from the majority of internet users.

 

If you put images into a table as a background picture and place a transparent gif over the top that can also help.

 

I've noticed some MS pages that when you click Edit>view source just give an error sound and nothing happens.

 

Not sure how that works though. [i'll look into it.] ???

 

if you are using frames aswell the edit>view source will only show the source for the parent frame and not the child so obviously a full page I-frame can help but Netscape doesn't work properly with I-frames sized with %ages so it's not the best.

 

however these days I don't bother cos like jimuni says if people want it they'll get it so why try?

 

Sometimes trying to hide something makes people look harder.

 

Whats in your source your worried about? Certain script can be encrypted safely although i've never tried it.

 

Thumbs Up

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...