HTML Encryption?

Alopederii
Alopederii used Ask the Experts™
on
Is there a way to encrypt HTML so that the "view source" is unreadable by people but readable by at least Internet Explorer?

Could I do something like convert it to binary?

My searches on the Internet only found products that "encrypt" HTML but decript it in the view source with the JavaScript function "unescape".  This is NOT what I want, because any intermediate JavaScript user could access the HTML code.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
no the html code is on the  client machine and you cannot hide it

Commented:
It's impossible however there is some work around techniques.

Look there:
http://www.experts-exchange.com/Web/Web_Languages/JavaScript/Q_20618200.html
Exploring SharePoint 2016

Explore SharePoint 2016, the web-based, collaborative platform that integrates with Microsoft Office to provide intranets, secure document management, and collaboration so you can develop your online and offline capabilities.

Commented:
Why? I cannot believe you're doing anything in HTML that is THAT unique that nobody else could duplicate it.

If you're looking to protect the INFORMATION -- slap a copyright notice on it, and sue anybody who copies it. That's what the large corporations do. The CONTENT is different from the FORMAT.

Commented:
Why? I cannot believe you're doing anything in HTML that is THAT unique that nobody else could duplicate it.

If you're looking to protect the INFORMATION -- slap a copyright notice on it, and sue anybody who copies it. That's what the large corporations do. The CONTENT is different from the FORMAT.

Author

Commented:
hexagon47 -- LOL, I like that link.  Are the <INVISIBLE> tags NN 4 compatible? :)

Louskan -- thanks for the work-arounds, but I think I would want to make it unreadable (even if the user saves it to their hard drive).

webwoman -- this is just something that has been bugging me.  I realize that the copyright would solve the protection problem.


Can't Flash do something like this?  It's only readable if the user has Flash, right?
I don't know, have not tried, I am afraid the browser will disapper :)

Alopederii trust me and look at this site and listen to webwoman: there are milions of sites and milions of users. The internet is about sharing knowledge and making knowledge AVAILABLE.

If a kid that for the first time goes to the web and rocks up at your website, wouldn't you be happy if he uses your html to learn ot improve his knowledge?

My opinion is this: put on the web the best you can and spend time to improve it not to hide it.

Sorry for the rant...

However do you think it's worth it to display your site as flash? You prevent users that do not have a flash plugin to see it because you want to hide the source? Do you honestly think it is worth it?

Then at this point learn asp and put chunks of code and content in a database, but it's not worth it

Top Expert 2013
Commented:
This is a never ending saga.  Every new developer thinks they have some magic code that must be hidden.

No offense intended Alopederii, but you are on a foolish quest. If you search this site you will find variations on this question have been asked hundreds of times.  You will not find a solution in any of them.  You can do a search on Google and get millions of hits.  You will not find a solution.  What you will find is many crooks trying to sell you various schemes; none of which work.  They have a lucrative niche that preys on the gullible.

Let's remove the HTML from the page!

A couple of years ago on another forum, a young member thought he had the solution.  He spent weeks building an applet that would generate the page code.  He posted a challenge, and a link to a page he used it on.  When you looked at the source all that was on the page was an applet tag even though the layout and content were quite complex.  Within 5 minutes 3 of us posted the source HTML.  

All it took was to enter this in the address bar of IE:

javascript:str=document.documentElement.innerHTML;document.write('<textarea rows=20 cols=60>'+str+'</textarea>');

That puts all the code generated for the page nicely in to a textarea ready to be save to Notepad.  There is even mor flexibility if you grab the page with XMLHTTP.

The code has to be there for the browser to render.  The code has to be readable by the browser.  Encripting depends on scripting.  Turn of scripting, no encription.  The most sophisticated encription approach is Microsofts JScript encription; which is actually encoding.  It works great, but everyone knows the formula.  Some of us can read it straight off the page, for those that can't there are at least 50 or 60 free decripters that do the job in a couple of seconds.

If it was possible to hide the code, why would the big sites with millions of dollars invested in their sites not protect the code?  I IBM, Microsoft, and Oracle have not found a way to do it, are you going to get something from a website on geocities or brinkster selling something for $49.95?

All that you will do is get run around in circles adding layer after layer trying to make it harder to get to the code.  You will fail to do that; however in a way you may succeed, because your site will becomes so unusable that no one will want to visit it, and you will no longer have to worry ablut someone looking at the code.

Cd&
If you cannot write HTML code that is good enough for everyone to see, then do not write any at all.


"A good coder does not need to steel anothers code"

jAy

Author

Commented:
Thank you all for your input.

I decided to give split the points for:

hexagon47 -- I really liked that link!

COBOLdinosaur -- I had forgotten about document.documentElement.innerHTML (even though I have used it plenty of times!).  As you have mentioned, that would make it impossible to encode HTML by ANY means.

Again, thanks!
Top Expert 2013

Commented:
Glad we could help.  Thanks for the A. :^)

This new split points features seems to work pretty good. :^)

Cd&
Top Expert 2013

Commented:
Glad we could help.  Thanks for the A. :^)

The new split points feature seems to work pretty good. :^)

Cd&
Top Expert 2013

Commented:
Glad we could help.  Thanks for the A. :^)

The new split points feature seems to work pretty good. :^)

Cd&
Top Expert 2013

Commented:
Glad we could help.  Thanks for the A. :^)

The new split points feature seems to work pretty good. :^)

Cd&
Glad you liked the link
Keep up the good work
I like the 'good assist' feature :)

Cd& you were quite enthusiastic about it :)
I know this is a late entry but... there could be information contained in hidden form fields that I would want to protect or maybe the url to my images folder. Sure, a user can right-click and save my image but I can use a no right-click script, open a window without a menu and most novice users won't know a way around this. Otherwise, you want my code, god bless you!
budweiser

i am a novice ;p
but i can still get your code

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial