Solved

Hide the Source

Posted on 1998-08-20
9
256 Views
Last Modified: 2010-04-09
Hi Experts,
  How can I hide my source from user when they go to view source .
I came across a site where it display some rubbish characters when I go to view source .
0
Comment
Question by:seahpc
[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
  • 2
  • 2
  • 2
  • +3
9 Comments
 
LVL 8

Expert Comment

by:Answers2000
ID: 1836851
I don't think there's a way to 100% hide it as once they've got the file, you've lost control.  Even if you can do it for a particular browser, they can work round it by writing their own HTTP client (MS give away sample source for these!) or using a different browser.

You can make the source hard to read or nearly useless.
1. Use a proprietary format (e.g. MacroMedia).  That way the HTML just invokes the viewer/plug-in, and all the real content is secure (kind of).  Disadvantage:user needs the reader for the content.
2. Put all your content in Java (and don't give the source out for this).  Again HTML just invokes the Java so reading the source doesn't help the user much.  Disadvantage: user must have a Java enabled browser (lots of corporate users disable Java)
3. Remove all white space, comments etc from the source making it really tough to read.
0
 
LVL 12

Expert Comment

by:Otta
ID: 1836852
> I came across a site where it display
> some rubbish characters when I go to view source.

Well, look in the browser's "cache" directory
on your hard-drive.  The "newest" file will be
the HTML-file which you most-recently retrieved.
0
 

Expert Comment

by:1slyguy
ID: 1836853
There is no way of hiding the soure completely, just think about it, if the source could be hidden then how could your browser read the information for that specific *.HTML page?
if you come across a page which doesnt let you look at the page source, then you probably havent finished loading up the page thats all, not because the page has "hidden its source code".... also could you tellus the page ware you saw "rubbish characters"?
0
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!

 
LVL 2

Author Comment

by:seahpc
ID: 1836854
The Site which I came across is http://www.mp3software.simplenet.com/encoders.html .
Anyone who know how to create that can you please show me how or give me a simple example . Thanks
0
 
LVL 10

Expert Comment

by:MasseyM
ID: 1836855
There is not "true" way to encode your HTML code... However, there are some tricky ways to make it harder for others to get it.

1) IF you use Javascript, place all your javascripts in a ".js" file nad then call them from your HTML pages like this:
<SCRIPT LANGUAGE="JavaScript" SRC="scripts/something.js"></SCRIPT>

This will link it to an external javascript file.  You could also put that file in a protected folder so that noone could DL it... (just use it to run the scripts)

2) Use Active Server Pages.  This method leaves all the scripting on the server and it only sends the HTML output... This is so far the best method.  

Any other question...

- Matt
0
 

Expert Comment

by:kaneua
ID: 1836856
Use ASP as your code base, this will NOT show in the source as it is run on the server. If you want to hide the HTML, well? WHY?
Is it that good? Send me a link!
0
 
LVL 2

Author Comment

by:seahpc
ID: 1836857
Hi MasseyM,
   Your methods will hide  the script but the HTML content will still be shown .
  I f you have went into the site I gave earlier, thats is the kind I wish to create .
 For your info, I am using ASP . Thanks
0
 
LVL 10

Expert Comment

by:MasseyM
ID: 1836858
Their HTML is not hidden... It is much further down the page... as for the script... that is something I am currently building an app for... Also, I don't see anything on their page that even uses a script...
0
 
LVL 12

Accepted Solution

by:
Otta earned 100 total points
ID: 1836859
You've been "tricked".

The HTML at the URL which you cite begins with an HTML comment:

 <!-- @# The script is hidden  Requires password to open ! -->

and then there are about 400 "blank" lines,
and *THEN* the complete HTML for the page is available.

You just need to "scroll-down" a _LONG_ way to view the source.
0

Featured Post

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
email validation 9 63
Boolean 13 49
Display Flex does not Wrap Items 2 46
Trying to use &NBSP to line up 3 rows 12 39
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

734 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