When you want to protect your .inc files for people so they can't download then and view your db connections (for instance) you need to protect them in the httpd.conf.
There is another way and that is renaming the extension to php, people cant view there sorce either.
Hiding source-code with javascript is one think is not correct. There is no way to protect the html from being viewed. And why should you? How did you learn html, did we not all requested sources to learn more... mcvdmvs
-- "It never hurts to help" -- Eek the Cat