How to hide HTML code from user?
1 Answer(s)      5 years and 9 months ago
Posted in : Security
View Answers

July 30, 2009 at 10:12 PM

the way gmail and other similar sites render content without showing source code is by generating the elements on the page using javascript. Unfortunately, javascript blockers are becoming more common so you would reach a smaller audience. Despite that, you could have a page that generates html elements through the use of DOM loading the data from another javascript file, or dynamically from the server using ajax. There is no way to eliminate reconstruction of your site, as whether with html or javascript, you are providing instructions for the browser to build the page, and with those instructions, people could reconstruct your page as well from the code. Look up javascript obfuscation.

Related Tutorials/Questions & Answers: