Blog coding and discussion of coding about JavaScript, PHP, CGI, general web building etc.

Thursday, May 26, 2016

How to hide precious HTML from user eyes?

How to hide precious HTML from user eyes?


I am thinking to create an website that generates HTML through a wizard.
Finally, I want to make the users to buy the generated HTML source if they like what they see.

But I don't want to let the users to steal the HTML, CSS and JS that I use to create the effect they want.

I want a technique which is immune to Firebug and Right Click -> View Page Source.

Any thoughts ?

edit: I remember something about iframes or frameset, but I'm not sure how to fool the browser and Firebug to execute the code without updating their capability of showing that source code. A popup is also a possible solution.

edit 2: html hosted in silverlight ? will you use it ?

Answer by m-y for How to hide precious HTML from user eyes?


The best thing you can do is to just obfuscate your code. Trying to hide the source is not going to work (for ex: if you disable right click-> view source that doesn't stop them from using the menu or saving the page or using a shortcut key or writing an app to stream the http request into a file and open that, etc).

Firstly, depending on what you are doing you can have the HTML code loaded through JS after the page load (AJAX).

As far as your JS goes:
Free Obfuscator
Not Free Obfuscator

In the end though, there is no stopping someone who really wants to get that source. Even obfuscated code can be rebuilt (though it's hell on wheels painful depending on how good the obfuscator is).

Answer by bcat for How to hide precious HTML from user eyes?


To really protect the sample HTML from prying eyes, you'd need to render it on the server-side and only pass image data to the client. If you want the user to be able to interact with the sample as if it were a normal Web page, you'll also need to send their pointer and keyboard inputs to the server and update the displayed image when necessary. At that point, though, you're basically making an HTTP-based version of VNC. This is definitely possible, but I don't think it will be easy, and I doubt there are any existing software packages to let you do this. If I were you, I'd rethink my business model a bit.

Answer by Dagg Nabbit for How to hide precious HTML from user eyes?


Sending XSL-templated XML to the browser may be enough fool some, and it will work more or less the same in many modern browsers including IE6 (maybe even 5.5).

But really, trying to hide the HTML code isn't going to work if anyone halfway serious wants to get it.

Answer by Matteo Riva for How to hide precious HTML from user eyes?


I am thinking to create an website that generates HTML through a wizard.
Finally, I want to make the users to buy the generated HTML source if they like what they see.

If this is what you need you might consider the possibility of creating a preview of the page as an image, and provide the download of the source only after the user agreed and paid. There is no magic way to let a browser display a code that you can't see.

Answer by Atul D for How to hide precious HTML from user eyes?


You can make a video, showing the functionality and upload the same, which may help users to view / feel it.


Fatal error: Call to a member function getElementsByTagName() on a non-object in D:\XAMPP INSTALLASTION\xampp\htdocs\endunpratama9i\www-stackoverflow-info-proses.php on line 72

0 comments:

Post a Comment

Popular Posts

Powered by Blogger.