I just want to ask on how to hide the html codes of a certain page so that when my client view the source, they cant see it..
Not going to happen. If the browser can't see the mark up then the page does not get rendered. Why would you care about hiding your mark up anyways?
you will need to use php, or another scripting language
<div id="private"> <?PHP /* ?> Here is the secret html!! <?PHP */ ?> </div>
the /* */ comment tags in php will stop the server outputting the code to the browser
if your page is in .html format
you will need to change to a php
then add a .htaccess file:
RewriteEngine on RewriteRule ^myfile\.html$ /myfile.php [L]
the .htaccess file redirects the url to the new page, so all links to your site will still work
Hope this helps!!
That is not a solution if you actually want the browser to show the content. Like I said there is not a way to keep someone from seeing the mark up of an element on a page if it is being shown in a browser.
thank you for the nice reply.Ive seen some sites encrypt there source code instead of hiding it. But maybe its hard to achieve it...If you have any idea pls continue posting on this topic..
Not possible. If the browser can't see it, then it can't process it. You can try to confuse your users by using ugly coding techniques, but anybody armed with FireFox and FireBug will see every element on your site.
Always remember the golden rule. If you don't want it public, don't put it online.
how about html and script encryption? Is it possible?