[Javascript] Disable View Source...

Josiah Gordon jgordon at directfile.com
Thu Sep 12 17:54:33 CDT 2002


Cutter,

You cannot disable the option of a client machine reading your code. Period.
HTML is rendered by a browser on a client machine. I think MS scripts their
site using Visual Studio .NET which has a disable_view_source flag (see URL
below).

Any IE-only view source block can be defeated because the client has to
render the code. To see for yourself use a telnet GET request to grab a URL.
You will receive plain-text code not parsed by your web browser. If a site
blocks this HTTP GET request it is no longer a web server, by definition.

http://www.euromind.com/iedelphi/ie5tools.htm
In particular: function DisableViewSource(Disabled: Boolean): Boolean;
//Disable "view source" from View-menu

Hope that clears it up a bit. My personal feeling is that if you block a
user from viewing your code you are only frustrating him or her. There is
nothing you can do to stop a person from getting client-side code (by
design!), so why spend the resources trying? Maybe in the future, maybe in
another markup language, but not in HTML.


--Josiah Gordon

-----Original Message-----
From: javascript-admin at LaTech.edu [mailto:javascript-admin at LaTech.edu]On
Behalf Of Cutter (javascript list)
Sent: Thursday, September 12, 2002 5:46 AM
To: javascript at LaTech.edu
Subject: [Javascript] Disable View Source...


On a few sites recently I have seen that not only is the View Source
disabled in the context menu but also from the View menu. Now, this may only
happen in IE, but I would still like to know how it was done. Anyone have a
take on this?

Cutter
_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript





More information about the Javascript mailing list