OK, consider how the internet works: The browser gets an HTML file, maybe some CSS and/or Javascript files too, reads them and builds up a page as it's requested to do. The browser has to be able to read the source, because that's all it understands and that's the only way your page is going to get built properly.
It follows that there's no way that you can hide your source code from people, and still serve it up to browsers. Anybody who says that they can is selling snake oil. Sure you could use javascript to put some easily surmounted obstacles in the way of would-be source readers, but you won't stop any moderately competent person from doing it. In addition, some JS obfuscation methods will prove fatal to your search engine position - usually a pretty undesirable side effect.
Even if it were possible, it wouldn't be desirable. Consider again how the internet works, but at the human level this time. Designers and would-be designers have been able to look at eachothers code, copy and improve upon eachothers techniques, and build the internet we know and love. Does anybody think we'd have come so far in so little time if each little innovation was a jealously guarded trade secret?
So, love your "View Source" button. If people want to copy your amazing source (and, let's face it, it probably isn't and they probably won't) you're helping the progress of the human race. Who wouldn't want to do that?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.