How to hide the source?
Datalk.com Computer, Internet, Games Talk FAQ



  Datalk.com - Computers, Internet, Games > Web Design and Web Development > Web Design Talk and Reviews

Topic How to hide the source?


Reply
 
June 21st, 2007   Post 1
Alan10
Bit

Posts: 5
Country: United States
Microchips: 107
Gadgets

Post - How to hide the source?


I want to disable the rightclick i.e., view>source option in my web page. One of my friend says that this can be done with the help of java script. Suggestions in this regard would be appreciated.
 

August 30th, 2007   Post 2
harvcr
Byte

Posts: 36
Country: United States
Microchips: 140
Gadgets


I don't really know the steps of how to do this but there are ways to encrypt you source code so people can't see it. I've seen some websites that all the show is a short javascript on their source code and this way people can't see the actual code.
 
August 30th, 2007   Post 3
shakiz26
Byte

Posts: 44
Country: New Zealand
Microchips: 44
Gadgets


<SCRIPT language=JavaScript>
<!-- http://www.spacegun.co.uk -->
var message = "function disabled";
function rtclickcheck(keyp){ if (navigator.appName == "Netscape" && keyp.which == 3){ alert(message); return false; }
if (navigator.appVersion.indexOf("MSIE") != -1 && event.button == 2) { alert(message); return false; } }
document.onmousedown = rtclickcheck;
</SCRIPT>

Sorry i found this on a site, when i right clicked it said function disabled here is the site if you want to have a look. http://www.angelfire.com/fl5/html-tutorial/rclick.htm
 
April 17th, 2008   Post 4
spidy2222
Byte

Posts: 36
Country: United States
Microchips: 358
Gadgets


i don't think thats useful for some browser like firefox as you can just use "view source" option and take all those source manually. firefox had done a lot of take and grab job for us.
 
April 17th, 2008   Post 5
LydiaB
Byte

Posts: 17
Country: United States
Microchips: 143
Gadgets


I thought the "view source" options on most browsers overcame the just about any scripts blocking right clicks.

Occasional surfers won't try to get around a right click block, though, so there are circumstances where that will be enough to protect a site's content.
 
April 18th, 2008   Post 6
anirban3598
Byte

Posts: 47
Country: India
Microchips: 354
Gadgets


I don't think people can actually stop other from viewing the source. But yes one can stop the function of right mouse button just to disable the copy feature or saving an image feature.
 
Reply





Content Relevant URLs by vBSEO


  Contact Us         Library