Solved

Lock/Hide Page's Source Code

Posted on 2009-07-09
4
811 Views
Last Modified: 2012-05-07
Hello,

I'm looking for something that can lock source code of pages of my website. Just like whenever they press ctrl+u or click view page source in browser. They do not see actual source code of the page.

Is it possible?
0
Comment
Question by:Andy1988
4 Comments
 
LVL 21

Expert Comment

by:Tapan Pattanaik
ID: 24813559
0
 
LVL 12

Accepted Solution

by:
jet-black earned 500 total points
ID: 24813619
It is not possible block users to view your page' HTML source code.
However you can make harder to understand your code with Javascript.

You can try these:
http://www.ioncube.com/html_encoder.php
http://scriptasylum.com/tutorials/encdec/encode-decode.html

However, when you make that, search engines will not be able to index your page.
0
 
LVL 19

Expert Comment

by:erikTsomik
ID: 24813660
try this
<head>
<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>

</HEAD>
0
 
LVL 4

Author Closing Comment

by:Andy1988
ID: 31601583
I tried the IonCube HTML Encoder and it worked.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now