PDA

View Full Version : HTML question



Jon
07-30-01, 09:48 PM
Is there anyway to keep the HTML code from being viewed(Edit with note pad or something similar) on a web page?

Thanks

Jon

Altema
08-03-01, 06:42 PM
I havent seen anything like that. There are some tricks though. One is using a redirection service. In the source you will only see the redirection service. Only prob is that your originall site addy is there. Another thing is spacing your HTML code. One of my friend spaced the begining line of his HTML code and it tricked me for about a second. Well if anyone knows a real way to hide it then plz tell me as well.

colour
08-05-01, 06:59 AM
actually there is, however i do not know how.

it wont be by way of pure HTML though, probably javascript of some sort.

Cornbread
08-05-01, 01:04 PM
i have seen it done, but don't know how? sorry. maybe tonyt will see this thread and help you out, he's pretty good about this stuff.

Joe
08-05-01, 04:39 PM
I have a source code encryptor thingy... it basically adds redundant code that does nothing other than make your source very very hard to sift through.

http://sifu.netfirms.com/source.htm

I jsut upped it for you all.

Here is an example.

--= BEFORE =--


<body bgcolor="#ffffff" text="#000000" id="all" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" link="#000020" vlink="#000020" alink="#000020">
<div align="left">
<script language="JavaScript1.2" src="http://www.speedguide.net/toolbar_ph3.js"></script>
<script language="JavaScript1.2" src="http://www.speedguide.net/top_menu.js"></script>
</div>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" id="AutoNumber1">
<tr>
<td height="17" width="10%"></td>
<td height="17" width="90%"></td>
</tr>
<tr>
<td width="10%" height="60" background="http://www.speedguide.net/images/sg_logo/sglogo_background.gif">
<img border="0" src="http://www.speedguide.net/images/sg_logo/sglogo_web1_350x60_b.gif" width="350" height="60"></td>
<td background="http://www.speedguide.net/images/sg_logo/sglogo_background.gif" height="60" width="90%" align="right" valign="bottom">
<p align="right"><font face="verdana,arial,helvetica" size="1"><b><font color="ffffff">
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
document.write(Date()+".")
// End -->
</SCRIPT>

==--=-=-=

--= AFTER =--


<script>
<!--
document.write(unescape("%3Cbody%20bgcolor%3D%22%23ffffff%22%20text%3D%22%23000000%22%20id%3D%22all%22%20leftmargin%3D%220%22 %20topmargin%3D%220%22%20marginwidth%3D%220%22%20marginheight%3D%220%22%20link%3D%22%23000020%22%20v link%3D%22%23000020%22%20alink%3D%22%23000020%22%3E%0D%0A%3Cdiv%20align%3D%22left%22%3E%0D%0A%3Cscri pt%20language%3D%22JavaScript1.2%22%20src%3D%22http%3A//www.speedguide.net/toolbar_ph3.js%22%3E%3C/script%3E%0D%0A%3Cscript%20language%3D%22JavaScript1.2%22%20src%3D%22http%3A//www.speedguide.net/top_menu.js%22%3E%3C/script%3E%0D%0A%3C/div%3E%0D%0A%3Cdiv%20align%3D%22center%22%3E%0D%0A%20%20%3Ccenter%3E%0D%0A%20%20%3Ctable%20border%3D %220%22%20cellpadding%3D%220%22%20cellspacing%3D%220%22%20style%3D%22border-collapse%3A%20collapse%22%20width%3D%22100%25%22%20id%3D%22AutoNumber1%22%3E%0D%0A%20%20%20%20%3Ctr% 3E%0D%0A%20%20%20%20%20%20%20%20%3Ctd%20height%3D%2217%22%20width%3D%2210%25%22%3E%3C/td%3E%0D%0A%20%20%20%20%20%20%20%20%3Ctd%20height%3D%2217%22%20width%3D%2290%25%22%3E%3C/td%3E%0D%0A%20%20%20%20%3C/tr%3E%0D%0A%20%20%20%20%3Ctr%3E%0D%0A%20%20%20%20%20%20%3Ctd%20width%3D%2210%25%22%20height%3D%2260% 22%20background%3D%22http%3A//www.speedguide.net/images/sg_logo/sglogo_background.gif%22%3E%0D%0A%20%20%20%20%20%20%20%20%3Cimg%20border%3D%220%22%20src%3D%22http%3 A//www.speedguide.net/images/sg_logo/sglogo_web1_350x60_b.gif%22%20width%3D%22350%22%20height%3D%2260%22%3E%3C/td%3E%0D%0A%20%20%20%20%20%20%20%20%3Ctd%20background%3D%22http%3A//www.speedguide.net/images/sg_logo/sglogo_background.gif%22%20height%3D%2260%22%20width%3D%2290%25%22%20align%3D%22right%22%20valign%3D %22bottom%22%3E%0D%0A%20%20%20%20%20%20%20%20%3Cp%20align%3D%22right%22%3E%3Cfont%20face%3D%22verdan a%2Carial%2Chelvetica%22%20size%3D%221%22%3E%3Cb%3E%3Cfont%20color%3D%22ffffff%22%3E%20%0D%0A%20%20% 20%20%20%20%20%20%3CSCRIPT%20LANGUAGE%3D%22JavaScript%22%3E%0D%0A%20%20%20%20%20%20%20%20%3C%21--%20Begin%0D%0A%20%20%20%20%20%20%20%20document.write%28Date%28%29+%22.%22%29%0D%0A%20%20%20%20%20%20 %20%20//%20End%20--%3E%0D%0A%20%20%20%20%20%20%20%20%3C/SCRIPT%3E"));
//-->
</script>



As you can see even if you managed to get by other forms of protecting the source you would really have your work cut out for you trying to steal some code. :eek:

SRF01
08-08-01, 12:22 PM
Thats pretty cool Ping,

How does it affect your file size and page loading times?

DVD Rewinder
08-13-01, 02:42 AM
Wouldnt that make the webpage load slower for those 56kers?

jalilv
08-13-01, 09:59 AM
This is very simple than you think :) , atleast in IE, but has some limitations. Just make the body tag look like as below:

<body oncontextmenu="return false;" >

blah...
</body>

This will disable the right click which is mostly used to view source.
User's can still ues the View menu to see the source. You can disable that too if you want so they cannot see the code from IE :). Smarter users will still go to Temporary Internet Files folder and peek your code.
Moral of the story: There is no foolproof way :( , sorry.

HTH