Solved

Hide the Source

Posted on 1998-08-20
9
236 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
  • 2
  • 2
  • 2
  • +3
9 Comments
 
LVL 8

Expert Comment

by:Answers2000
Comment Utility
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
Comment Utility
> 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
Comment Utility
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
 
LVL 2

Author Comment

by:seahpc
Comment Utility
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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 10

Expert Comment

by:MasseyM
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

This article discusses how to create an extensible mechanism for linked drop downs.
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 …
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now