Click to See Complete Forum and Search --> : Hiding Java Script Code in a HTML
clyde
07-10-2003, 01:09 PM
Can anybody tell me if you can make java script code in an html not viewable when it is tried to be viewed by clicking VIEW then SOURCE on the Browser.
Help me if you can.
Thanks
Clyde
Khalid Ali
07-10-2003, 01:14 PM
No...JavaScript is open source programming language.
requestcode
07-10-2003, 01:32 PM
You could make it an external javascript, but that would only keep the un-initiated from getting it. They would not be able to view it using the view source, but they could view it by typing the external file name into the address bar. The line in your HTML document would look like this:
<script language="javascript" src=myscript.js></script>
The the file would have javascript statements but not the <script> tags at the beginning or end.
FlashPeak (http://www.flashpeak.com/crypthtml/index_enc.htm) thinks it's possible!
Khalid Ali
07-10-2003, 01:42 PM
Try viewing this in NS ..so much for encrypeded code..:D
requestcode
07-10-2003, 02:06 PM
Interesting. NS7 shows the encrypted source code instead of the document. I wonder how many websites would like that! :D
Do you think someone should tell FlashPeak it doesn't work?:eek:
kdcgrohl
07-10-2003, 04:42 PM
its not possible to block all of the people all of the time, but it IS possible to block most of the people all of the time. there will always be those who are determined enough to get what they want, for the other 98% of the population, look @ my "site protection" section. (http://www.kdcgrohl.com)
Jeff Mott
07-10-2003, 07:37 PM
for the other 98% of the populationOf that 98%, probably at least 80% are casual users who don't care about viewing your code anyway. The other 20% would ask a friend/sibling or even a forum. So in the end your view source blocker stops nearly nobody.FlashPeak thinks it's possible!I'm surprised they havn't been sued. If you view their encrypted page source, you'll see they actually use JScript.Encode, which is a Microsoft product (hence it is IE specific).
Here is an article discussing HTML source protection.
http://www.securityfocus.com/archive/1/319419/2003-04-19/2003-04-25/0
kdcgrohl
07-11-2003, 09:21 AM
my buddy jeff from htmlgoodies, whats goin on, have missed your constant contradictions... anyway, not to sound like an @$$, but i remember posting my little test over there, and i dont remember you finishing it...
Webskater
07-11-2003, 09:31 AM
If you put your javascript in a separate text file and include it on the page and keep it in a directory with no browsing privileges - doesn't that hide it?
Charles
07-11-2003, 09:38 AM
Originally posted by Webskater
If you put your javascript in a separate text file and include it on the page and keep it in a directory with no browsing privileges - doesn't that hide it? It will also hide it from the browser.
Jeff Mott
07-11-2003, 07:22 PM
have missed your constant contradictionsAlso not to be an @$$, but was I wrong?i remember posting my little test over there, and i dont remember you finishing it...What test was that?