Solved

hide the source!

Posted on 2000-03-27
5
152 Views
Last Modified: 2010-04-09
Hi,

I'm wondering how can i stop others from viewing my HTML source page?

rgds,

B
0
Comment
Question by:BSIM
5 Comments
 
LVL 5

Expert Comment

by:compmania
ID: 2661745
http://www.vmirror.com/forums/load/html/msg0423460411988.html

That is about all I can find. I know there is a way to disable right-clicking but I can't find it now.
0
 
LVL 1

Accepted Solution

by:
bassque earned 10 total points
ID: 2661762
the only way Ive ever seen it actually done is by scrambling the source with a program called scriptkeeper
available at:
http://psyral.com/
0
 
LVL 11

Expert Comment

by:mouatts
ID: 2665523
If you mean never being able to see it then the answer is that you can't ideas such as disabling the buttons don't work if some one telnets to your site.

Probably the most effective way, although still hackable, is to generate the entire page from javascript which is held in a javascript library file rather than within the html file.

The gist of this would be

<HTML>
<SCRIPT LANGUAGE="javascript" SRC="myjs.js">
</SCRIPT>


Then the js file would contain the document writes to produce the page.

Viewing source will then not show the javascript its self.

HTH
Steve
0
 
LVL 1

Expert Comment

by:Hocam
ID: 2678975
No, you cannot hide your HTML code whatever you do.

I have seen people use scripts to disable right click:
Here is one:

<SCRIPT language=javascript>
// No rightclick script
// (c) 1998 barts1000
// barts1000@aol.coma
function click() {
if (event.button==2) {
alert('Put your text over here!')
}
}
document.onmousedown=click
</SCRIPT>

The problem would be I can still view your source code either by from the 'View' menu in IE or by just simply saving the HTML file to my harddisk and viewing it in Notepad.(IE not only saves the HTML page also the graphics embedded to it. :)

You can also retrieve any htmls or images from the browser cache....

So, there is no really a way to hide your HTML code.

Thanks...good luck...
-Hocam
0
 
LVL 5

Expert Comment

by:compmania
ID: 2680810
Only IE 5+ saves the images also.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Browser Chrome downloads colored link 5 48
AdminLTE with wordpress 15 136
Why a span is lower 2 26
message Alert on an empty search 10 20
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

840 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