[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RE: I need little help



Didier Caamano:
> I was wondering how I can configure apache 1.3 to not allow visitors to view 
> the source code of the page when they click on View ->Source

Marcel Hicking:
> You could do that with PHP.
> AddType application/x-httpd-php-source .htmls

That's the opposite - it allows the viewer to get the source even easier.

There is *no way* you can hide the HTML source completely. You have to send it to the browser, so the browser can render it. There are a myriad of ways you can then get it including View->Source, browser cache, File->Save As, raw HTTP requests etc.

There are techniques that will obsfucate the source to make it harder to read. One common method is to delete all the whitespace from the HTML.

Another is to encode the source, then turn the page into a giant javscript function that unencodes it, there is software that does this. It's only obsucation though, not encryption (which some software claims) as the function to unencode has to be visible for the browser to run it, and can be therefore be emulated.

Carl



Reply to: