With the addition of some no-cache headers this seems to be the best
approach I've ever seen.
-- 
mailto:[EMAIL PROTECTED]
Thursday, April 3, 2003, 8:40:01 PM, you wrote:

CP> Actually, you kind of can I think...

CP> You can use a cfm file as a .js file to emulate a javascript file.  Change
CP> the extension to .cfm...  Careful, cf studio won't correctly parse it, but
CP> nonetheless it'll work...  Just tested it.

CP> <cfparam name="cgi.http_referer" default="">
CP> <cfif cgi.http_referer eq ""><cfabort></cfif> at the top.

CP> Then, in your script, just enter:
CP> <script language="javascript" src="temp.cfm"></script>

CP> In THEORY, the .js will come up blank unless it's called from another file
CP> on your site.

CP> Tweak it as you wish.  It should keep prying eyes from reading your .js
CP> file.

CP> This isn't 100% bulletproof, but should work for the most part.  You can of
CP> course get more anal on the file and verify the referer more carefully.


CP> -----Original Message-----
CP> From: Dave Watts [mailto:[EMAIL PROTECTED] 
CP> Sent: Thursday, April 03, 2003 11:35 AM
CP> To: CF-Talk
CP> 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.

CP> This isn't possible. If you don't put it in a web-accessible directory, your
CP> web browser won't be able to fetch it.

CP> Dave Watts, CTO, Fig Leaf Software
CP> http://www.figleaf.com/
CP> voice: (202) 797-5496
CP> fax: (202) 797-5444


CP> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
                                

Reply via email to