How To Hide The Source Code From Browser Viewing
- Home
- Programming
- Web Development
I don't think there is any real solution to this question, or at least I haven't found anything concrete that would work, so I'll put the question out to the group.
Is there any real solution that will allow you to hide your website source code from someone that is visiting your site and is this solution workable across the various web browsers?

There isn't, you can't. And don't try the prevent right click thing, that just annoys people and it doesn't work anyway as every browser either allows you to disable right click override or there are extensions/apps/whatever available that can do it.
The best you can really do is obfuscate your JavaScript, if that's what you're trying to hide, but anyone with any slight technical ability or ability to use google could get the script anyway.
http://www.jsobfuscate.com/
http://javascriptobfuscator.com/
And you can't obfuscate HTML.
- ROM
- CPU
- RAM
- GPU

7 Replies

There isn't, you can't. And don't try the prevent right click thing, that just annoys people and it doesn't work anyway as every browser either allows you to disable right click override or there are extensions/apps/whatever available that can do it.
The best you can really do is obfuscate your JavaScript, if that's what you're trying to hide, but anyone with any slight technical ability or ability to use google could get the script anyway.
http://www.jsobfuscate.com/
http://javascriptobfuscator.com/
And you can't obfuscate HTML.


Antal is from my understanding spot on, I've never heard nor seen any way of hiding your HTML source code from anyone.

It can be done, but isn't done often at all. Caveat is, it will likely break web browser rendering.Antal Daavid wrote:
....And you can't obfuscate HTML.
Search for "html obfuscator", such as—
- http://htmlobfuscator.com/
- http://www.wmtips.com/tools/html-obfuscator/
- http://isnoop.net/tools/obfuscate.php
- etc

RoguePacket wrote:
It can be done, but isn't done often at all. Caveat is, it will likely break web browser rendering.Antal Daavid wrote:
....And you can't obfuscate HTML. Search for "html obfuscator", such as—
- http://htmlobfuscator.com/
- http://www.wmtips.com/tools/html-obfuscator/
- http://isnoop.net/tools/obfuscate.php
- etc
Well, that's not that same as JS obfuscation, it's either just obfuscating through JS or unicode entities (which will actually print the HTML to the browser, it won't re-render it, so it's useless). The best you can hope for is putting in tons of fake HTML, but even then, with Firebug or any inspector, just extract what's rendered and you got it, way easier than JS. So it's not really obfuscation, just bad HTML or it's JS printing HTML.


This is sort of like saying "How can I hand out this flyer without letting people read the words on it?"
If you need to control everything that badly then look into Flash or Java. (And then watch the world totally ignore your site.)
A question that needs asking: Why on Earth do you feel like you need to block access to the source of your site?

Hello,
I think I have done something like this in my project. If I am not wrong you want to hide your html.
For example if you login in your Gmail account and if you try to view source you will not see any html. So we can achieve this using Javascript. If you really need it I can provide you solution.

user488685 wrote:
Hello,
I think I have done something like this in my project. If I am not wrong you want to hide your html.
For example if you login in your Gmail account and if you try to view source you will not see any html. So we can achieve this using Javascript. If you really need it I can provide you solution.
It's just loading it remotely, use the inspection tool in your browser to view the entire window frame, and you can easily just copy the HTML that way, so not much of a solution.
This topic has been locked by an administrator and is no longer open for commenting.
To continue this discussion, please ask a new question.
How To Hide The Source Code From Browser Viewing
Source: https://community.spiceworks.com/topic/790618-hiding-view-source-on-websites
Posted by: pyattsawn1947.blogspot.com
0 Response to "How To Hide The Source Code From Browser Viewing"
Post a Comment