Prevent viewing html source

  • Thread starter Thread starter Brooke
  • Start date Start date
B

Brooke

How can I prevent a user from viewing the html code on a web page?

e.g. right click->view source
 
It is not possible. There are other ways of viewing source besides the one
you described - saving the page locally, simply choosing "View Source" from
your favorite browser's Edit menu, right clicking, screen scraping, etc.
 
To add- there are a couple of ways using Javascript to disable right
clicking (google for these scripts) but there are at least 3 other ways to
get at your source.
 
There are at least a half-dozen ways to do it that I can think of.

Bottom line is, the HTML is *downloaded* by the browser. If the browser can
read it, so can you.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
A brute awe as you,
a Metallic hag entity, eat us.
 
Back
Top