Link to home
Start Free TrialLog in
Avatar of JaimeJegonia
JaimeJegoniaFlag for United States of America

asked on

How to prevent viewing of HTML page source

How to prevent viewing of HTML page source
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of NetworkArchitek
NetworkArchitek

Angelll is correct. Ultimately, the reason for this is that the browser must display it. If someone wanted to they could simply monitor the HTTP traffic and see your HTML in plaintext. But it depends on what your goals are on how much you need to do prevent someone seeing your code. You could look at other presentation tools like Flash or something like that to make it quite a bit harder for someone to "copy" your work.
There are some products that claim to be able to encrypt your HTML files in a manner that browsers can internally decrypt for display, or to just plain obfuscate the HTML code.  For example:
http://flashpeak.com/crypthtml/
http://www.marketingrocket.com/prodhpr.php
http://hide-html-source-code.qarchive.org/applications.html
http://www.2-dynamic.com/

Note that (1) I've never personally experimented with any of these, and honestly don't know whether or how well they'd work, and (2) I suspect that some of these tactics might well also have negative SEO effects.