banner



How To Hide The Source Code From Browser Viewing

  1. Home
  2. Programming
  3. 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?


Antal Daavid

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. 

Popular Topics in Web Development
Which of the following retains the information it's storing when the system power is turned off?
  • ROM
  • CPU
  • RAM
  • GPU
88% of IT pros got this right.

7 Replies

Antal Daavid

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. 

RAM.
RAM. This person is a Verified Professional
This person is a verified professional.
Verify your account to enable IT peers to see that you are a professional.
Feb 13, 2015 at 12:38 UTC

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

RoguePacket

Antal Daavid wrote:

....And you can't obfuscate HTML. 
It can be done, but isn't done often at all.  Caveat is, it will likely break web browser rendering.

Search for "html obfuscator", such as—

  • http://htmlobfuscator.com/
  • http://www.wmtips.com/tools/html-obfuscator/
  • http://isnoop.net/tools/obfuscate.php
  • etc
Antal Daavid

RoguePacket wrote:

Antal Daavid wrote:

....And you can't obfuscate HTML. 
It can be done, but isn't done often at all.  Caveat is, it will likely break web browser rendering.

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.

jma89.tk
jma89.tk This person is a Verified Professional
This person is a verified professional.
Verify your account to enable IT peers to see that you are a professional.
Feb 13, 2015 at 13:16 UTC

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?

JS811

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.

Antal Daavid

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

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel