http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dninstj/htm
l/privacyforscriptwriters.asp
-----Original Message-----
From: Steven Elliott [mailto:[EMAIL PROTECTED]]
Sent: 09 August 2001 10:14
To: [EMAIL PROTECTED]
Subject: Re: Offtopic: Hiding Javascript - Can be done
on 09/08/2001 09:15, Geert Van Damme at [EMAIL PROTECTED] wrote:
>
> That won't do very much.
> Simply type in the URL to the hardeep.js file and you can read it.
> No, it's very simple. You can not hide client side scripting for the user.
Not
> a chance.
>
> Geert Van Damme
> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Kailash
> Sent: donderdag 9 augustus 2001 22:01
> To: [EMAIL PROTECTED]
> Subject: Re: Offtopic: Hiding Javascript
>
> one way is to - include your java script file in to your page.
> by this method script file doesn't get visible to the user.
>
> <script langauage="JavaScript" src="hardeep.js">
> </script>
>
> ------------------------------------------
> Thanks & Regards,
> Kailash,
> Aithent Technologies (p) Ltd., Plot No.8&9 ,
> Electronic City, Sector 18 , Gurgaon 122015,
> Tel : + 91 124 6455504/11 ( Ext .205 )
> DO TAKE VERY GOOD CARE OF YOUR HEALTH
> ----- Original Message -----
> From: Hardeep Singh <mailto:[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Sent: Wednesday, August 08, 2001 11:54 PM
> Subject: Offtopic: Hiding Javascript
>
> Hi,
>
> I am sending this question to this list because I dont know about more
> appropriate ones. I want to hide javascript code from the user, i.e, he
> should not be able to do view source and see the code. I know that it is
> impossible to hide java script code from the user but is there any way to
> make it too hard?
>
> Hardeep Singh
> http://SeeingWithC.cjb.net
>
Geert is right that by simply loading the JavaScript file via direct URL it
will be visible to the browser/client. But to protect my scripts some of
which are really client-side applications, I have developed a process which
allows the browser to load the JavaScript file just once which occurs even
before the rest of the page is loaded. Subsequent attempts to load the
JavaScript file will fail. The process is a bit restricted at the moment as
it uses cookies but the method can be applied to URL rewriting as well.
Basically you set a cookie variable in the client when they load the page.
As the page loads the JavaScript page is referenced and loaded. When the
JavaScript page first loads it checks to see if the cookie variable is true
and if so will return the correct JavaScript. It also resets the cookie to
false. If the JavaScript page finds the cookie to be false it will return a
blank page so that if you attempt to access the file via direct URL you will
fail.
This is not fail safe as the JavaScript still resides client side but it
means to access the code you have to know more than just how to type a URL.
//*
Steven Elliott <[EMAIL PROTECTED]
Head of Technology
VTV Learning Corporation
Los Angeles - Boston - Lisbon
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets