> I have this in one of my style sheets:
> 
> ..mask {
>     <cfoutput>behavior :
> url("#Attributes.ApplicationPath#/mask_js.htc");</cfoutput>
> }
> 
> When this runs, it shows the path to the mask_js.htc file if 
> someone views source. I would like to hide this path, so that 
> no one can download thit file easily. Unfortunately, the behavior 
> property only uses URLs, so I can't specify an unreachable absolute 
> path.

If you want people to be able to download it, you'll have to specify a URL,
and if someone wants to tinker around enough, there's nothing you can do to
prevent them from downloading the file itself. You could make it slightly
more difficult by using JavaScript to build URLs on the client - a sort of
obfuscation - but that's about it.

Since you're using IE-specific stuff like HTC files, though, you might be
able to encode some of the logic using the MS script encoder. There's more
info on that at http://msdn.microsoft.com/scripting/.

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

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to