However, you can fake the referer value. Repeat after me - you cannot hide JavaScript. JavaScript is run on the client. Therefore the client (and therefore the user) MUST have access to it.
======================================================================== === Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc (www.mindseye.com) Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia) Email : [EMAIL PROTECTED] Blog : www.camdenfamily.com/morpheus/blog Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda > -----Original Message----- > From: Costas Piliotis [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 03, 2003 7:40 PM > To: CF-Talk > Subject: RE: Hiding JavaScript codes > > > Actually, you kind of can I think... > > You can use a cfm file as a .js file to emulate a javascript > file. Change the extension to .cfm... Careful, cf studio > won't correctly parse it, but nonetheless it'll work... Just > tested it. > > <cfparam name="cgi.http_referer" default=""> > <cfif cgi.http_referer eq ""><cfabort></cfif> at the top. > > Then, in your script, just enter: > <script language="javascript" src="temp.cfm"></script> > > In THEORY, the .js will come up blank unless it's called from > another file on your site. > > Tweak it as you wish. It should keep prying eyes from > reading your .js file. > > This isn't 100% bulletproof, but should work for the most > part. You can of course get more anal on the file and verify > the referer more carefully. > > > -----Original Message----- > From: Dave Watts [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 03, 2003 11:35 AM > To: CF-Talk > Subject: RE: Hiding JavaScript codes > > > > The part I'm not sure about is, that it maybe possible to > > put the javascript.js file in a non-web directory. > > This isn't possible. If you don't put it in a web-accessible > directory, your web browser won't be able to fetch it. > > Dave Watts, CTO, Fig Leaf Software > http://www.figleaf.com/ > voice: (202) 797-5496 > fax: (202) 797-5444 > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4