Hide the source

Hi everyone! is it possible to hide the source code when you want to view it in browser…like CTRL + U or rightclick+view source code in order that nobody knows.

Maybe you could disable it with javascript, but if someone wants to see it they can disable javascript. And I personally would never again visit a site that disables things like right mouse click.

Ok I understand ) thx !)

There are some people who sell programs that supposedly prevent people viewing your page source for as much as several hundred dollars.

All such programs can be defeated with a web browser and two lines of JavaScript.

It is absolutely impossible to hide the page code. Web pages are not compiled so you can see everything which is send to the browser.

If you’re talking HTML, you can’t hide it, and the best you could do to obfuscate it would be just to make it difficult to follow (remove line breaks, use non-semantic class names, liberal use of numeric character entities, etc) which is almost certainly a bad idea.

Yes the source code can be hidden with the help of java code.This is done to due to copying of meta tags or meta description and keywords.
you can hide the source code in HTML or in PHP. No problem its really works with them .

You left out the flying pigs. That solution will only work if you own at least a trillion flying pigs and keep them all in a matchbox under your bed.

Pls help me dear.I not know where to get enough pigs. I not have many $$ to buy so I hop they are free. Pls help. :frowning:

EDIT: p.s. where I also can get bigger bed?

Does that mean you already have a big enough matchbox?

Not sure where you’d get free flying pigs from. They seem to be in short supply at the moment at any price.

For anyone looking for the opposite of source code protection - ie a way of getting readable source code for any web page where you have mistakenly obfuscated the source and now need to work out what the original looked like then see http://javascriptexample.net/viewsource.php for a bookmarklet and userscript that you can add to your browser to make accessing the readable version of the source easier.

You can get flying pigs anywhere you can get pigs :slight_smile:

See #3 in rfc1925. http://www.ietf.org/rfc/rfc1925.txt