Solved

Lock/Hide Page's Source Code

Posted on 2009-07-09
4
817 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
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…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

762 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