Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Lock/Hide Page's Source Code

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

Technology Partners: 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

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
The viewer will learn how to count occurrences of each item in an array.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

715 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