Prevent viewing html source

B

Brooke

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

e.g. right click->view source
 
E

Elliot Rodriguez

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.
 
E

Elliot Rodriguez

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.
 
K

Kevin Spencer

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top