Hiding HTML codes

How can I hide HTML codes whenever View Page/Frame Source is clicked from browser's menu or popup menu by the surfer?
AdmaviraAsked:
Who is Participating?
 
ivanchoConnect With a Mentor Commented:
The only thing you can do to harden the reading of the page is to use only CR as the end-of-line marker.
Usually windows based text editors put the CR/LF combination at the end of each line. If you strip the LF character, it will be very hard to read your HTML code with notepad, which is the default editor poped when someone wants to view the source. Even more if you avoid the CR characters, usually Notepad cannot display normally too long lines, even if "Wrapping" is enabled.
Warning to remove the CR/LF chars you must edit your html page with some word processing tool, not with notepad.
Notice this will NOT work if the page is saved and then viewed with wordpad. Unfortunately this is ALL you can do.
0
 
AdmaviraAuthor Commented:
it would be an excellent help if a sample code could be provided to show how HTML codes could be hidden.
0
 
MasseyMCommented:
Every HTML web author wishes they could hide their HTML code, but you cannot... The only thing that you can do is to place a copyright identifiation within the page and hope that people are honest..

0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
AdmaviraAuthor Commented:
Is there a way to remove the file from the cache and disable Save As and Page Source in browser's menu?
0
 
slinkyCommented:
If you have any particular parts of functionality you wish to hide completely then the only way (without messing with the browser which might not work and might annoy people) is to stick in all in a Java applet.
0
 
chewymonCommented:
Whhat type of thing are you trying to hide?  Since HTML is a presentation language,  nothing about it is secret or copyrighted.  Maybe cgi would work for you.
0
 
steath_acidCommented:
all you need is a a JavaScript program to encrypt the codde so it is secret.  one is avadible for free at:
http://hotfiles.zdnet.com/cgi-bin/texis/swlib/hotfiles/info.html?fcode=000MCV
this program encrypts the code into Jscript then decrypts it on any Jscript enabled browser.  It is not perfect but it works pretty well.  If this works I will post this as a answer.(after you reject jvancho's answer)
0
 
steath_acidCommented:
I know what it says but it seemed like the best solution for teh problem.
0
 
steath_acidCommented:
Works well except it screws up existing Jscript but you can add it to the encoded copy.  It also adds a banner at the top and the bottom, I am sure somebody who knows tons about Jscript can tell you how to remove it.  thry it I think it works well.  If you are not worried about experts you could do a frame code with the frae mat 100%, then 0%.

0
All Courses

From novice to tech pro — start learning today.