Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Lock/Hide Page's Source Code

Posted on 2009-07-09
4
Medium Priority
?
838 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 12

Accepted Solution

by:
jet-black earned 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Suggested Courses

927 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