Protect a webpage
-
Dear all I am developing a website for a client in ASP.NET, Client wants to protect his webpages from copied. He asked me the following 1) Stop right click 2) Stop Context menu 3) Stop user saving and viewing source using "Save Page As" and "Page Source" in firefox. "Save As" and "view source" in internet explorer. 4) Stop taking print screen and saving it as image In this i have accomplised the tasks 1 & 2 using javascript. is there any way to do the 3 & 4 tasks. If not possible please drop me the exact reason so i can make the client understand. Thanks in advance Regards sc
-
Dear all I am developing a website for a client in ASP.NET, Client wants to protect his webpages from copied. He asked me the following 1) Stop right click 2) Stop Context menu 3) Stop user saving and viewing source using "Save Page As" and "Page Source" in firefox. "Save As" and "view source" in internet explorer. 4) Stop taking print screen and saving it as image In this i have accomplised the tasks 1 & 2 using javascript. is there any way to do the 3 & 4 tasks. If not possible please drop me the exact reason so i can make the client understand. Thanks in advance Regards sc
I doubt 3 and 4 can be accomplished -- at least not in every browser. And there is no way to completely protect the XHTML/CSS/JavaScript source (your serverside code is safe though, unless the server itself is compromised). If someone has the will and know-how to get it, they will.
-
Dear all I am developing a website for a client in ASP.NET, Client wants to protect his webpages from copied. He asked me the following 1) Stop right click 2) Stop Context menu 3) Stop user saving and viewing source using "Save Page As" and "Page Source" in firefox. "Save As" and "view source" in internet explorer. 4) Stop taking print screen and saving it as image In this i have accomplised the tasks 1 & 2 using javascript. is there any way to do the 3 & 4 tasks. If not possible please drop me the exact reason so i can make the client understand. Thanks in advance Regards sc
-
Dear all I am developing a website for a client in ASP.NET, Client wants to protect his webpages from copied. He asked me the following 1) Stop right click 2) Stop Context menu 3) Stop user saving and viewing source using "Save Page As" and "Page Source" in firefox. "Save As" and "view source" in internet explorer. 4) Stop taking print screen and saving it as image In this i have accomplised the tasks 1 & 2 using javascript. is there any way to do the 3 & 4 tasks. If not possible please drop me the exact reason so i can make the client understand. Thanks in advance Regards sc
rowdykuttan wrote:
In this i have accomplised the tasks 1 & 2 using javascript.
And anyone can easily disable Javascript in the browser to undo that.
rowdykuttan wrote:
is there any way to do the 3 & 4 tasks.
You might be able to accomplish part of task 3, but than can also easily be undone by simply requesting the page using some other program than the browser. All that is needed is a single line of code:
new WebClient().DownloadFile(url, fileName);
Anything that the browser can read can also be read by other programs, so there is no way that you can keep anyone from reading anything that you want to show on the web. Task 4 is not possible at all using Javascript, as it's not a function in the browser, it's a function in the operating system.
Despite everything, the person most likely to be fooling you next is yourself.
-
Dear all I am developing a website for a client in ASP.NET, Client wants to protect his webpages from copied. He asked me the following 1) Stop right click 2) Stop Context menu 3) Stop user saving and viewing source using "Save Page As" and "Page Source" in firefox. "Save As" and "view source" in internet explorer. 4) Stop taking print screen and saving it as image In this i have accomplised the tasks 1 & 2 using javascript. is there any way to do the 3 & 4 tasks. If not possible please drop me the exact reason so i can make the client understand. Thanks in advance Regards sc
There is no way of preventing a web page being copied. The idea is that the source is easily accessible and trying to prevent the user from doing this won't really do anything, since the nature of the Internet is such that files that can be viewed in a web browser can be accessed by anyone. Regards, --Perspx
"A refund for defective software might be nice, except it would bankrupt the entire software industry in the first year."
-Andrew Tanenbaum
"Einstein argued that there must be simplified explanations of nature, because God is not capricious or arbitrary. No such faith comforts the software engineer."
-Fred Brooks -
Dear all I am developing a website for a client in ASP.NET, Client wants to protect his webpages from copied. He asked me the following 1) Stop right click 2) Stop Context menu 3) Stop user saving and viewing source using "Save Page As" and "Page Source" in firefox. "Save As" and "view source" in internet explorer. 4) Stop taking print screen and saving it as image In this i have accomplised the tasks 1 & 2 using javascript. is there any way to do the 3 & 4 tasks. If not possible please drop me the exact reason so i can make the client understand. Thanks in advance Regards sc
The simple answer is You can't.
Todd Smith
-
Dear all I am developing a website for a client in ASP.NET, Client wants to protect his webpages from copied. He asked me the following 1) Stop right click 2) Stop Context menu 3) Stop user saving and viewing source using "Save Page As" and "Page Source" in firefox. "Save As" and "view source" in internet explorer. 4) Stop taking print screen and saving it as image In this i have accomplised the tasks 1 & 2 using javascript. is there any way to do the 3 & 4 tasks. If not possible please drop me the exact reason so i can make the client understand. Thanks in advance Regards sc
You think you've accomplished one and two. I guarentee you that I can get around it if I wanted to. I suggest you shouldn't be taking clients if you can't answer their questions.
Christian Graus Driven to the arms of OSX by Vista.
-
Dear all I am developing a website for a client in ASP.NET, Client wants to protect his webpages from copied. He asked me the following 1) Stop right click 2) Stop Context menu 3) Stop user saving and viewing source using "Save Page As" and "Page Source" in firefox. "Save As" and "view source" in internet explorer. 4) Stop taking print screen and saving it as image In this i have accomplised the tasks 1 & 2 using javascript. is there any way to do the 3 & 4 tasks. If not possible please drop me the exact reason so i can make the client understand. Thanks in advance Regards sc
Hi, The following sample will help you out for the points 1 and 4 for sure. Please try this and reply.
<html>
<head>
</head><!-- To disable Print Screen feature -->
<body onload=setInterval("window.clipboardData.setData('text','')",2) oncontextmenu="return false" onselectstart="return false">
Test Text
<!-- To disable right click in the web page --><script language=JavaScript>
function clickIE() {
if (document.all) {
return false;
}
}
function clickNS(e) {
if (document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS;
}
else{
document.onmouseup=clickNS;
document.oncontextmenu=clickIE;
}
document.oncontextmenu=new Function("return false")
</script><!-- To Disable Text Selection -->
<script>
function disableselect(e){
return false
}function reEnable(){
return true
}//if IE4+
document.onselectstart=new Function ("return false")//if NS6
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}
</script></html>
Thanks, Rajdev K R