Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

-Web site designers FAQ

HTML: How To...

How can I hide my HTML Source? by ChrisHunt
Posted: 11 Oct 05


Next question please...

What? You want more?

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?

Back to -Web site designers FAQ Index
Back to -Web site designers Forum

My Archive

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close