-
Protecting Your HTML Code With JavaScript
We all know that source code theft is wrong and covered by copyright never the less some webmasters will inevitably try to steal the work that the honest ones amongst us create.
Unfortunately, there is no sure fire way to stop people from stealing our HTML code but, we can make it hard for them.
The following JavaScript coding, when placed in your <body> tag can make it harder for the opportunistic webmaster to steal your coding.
Simply copy and paste everything below into your body tag and change the text in the var message=”” field.
<!–Start Copy–>
<SCRIPT language=”JavaScript”>
<!–
var message=”Copyright 2000 by Your Site. WARNING ! All content contained within this site is protected by copyright laws. Unauthorized use of our material is strictly prohibited.”;
function click(e) {
if (document.all) {
if (event.button==2||event.button==3) {
alert(message);
return false;
}
}
if (document.layers) {
if (e.which == 3) {
alert(message);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
// –>
</SCRIPT>
<!–End Copy–>Whilst this is not a sure fire way to stop the occurrence of HTML theft as mentioned already it will deter those webmasters who perhaps were there for the simplistic reason of viewing your source code.
Article written by Lee
Leave a Reply
Related Posts
Recent Posts
- Why Cant I Get Indexed By The Search Engines?
- Whats A Twink
- What’s In A Niche?
- What’s A CHMOD?
- What On Earth Is CGI?
- What Is The Golden Ratio?
- What Happens Your Current Processor Bails?
- SMS Marketing To MMS Marketing – WAP Billing Solutions
- AVS Changes – Is The Proverbial Sky Falling?
- Utilizing All The Content You Use On TGP Galleries!