Sorry for not being more clear here, and it was not really a question, I
basically wanted to check if there were any major objections to it.
For cases when you have the image lying in a web-accessible directory (could
also be on another server), or when any dynamically created image (graphing
tool, ArcIMS/mapserver, captcha etc) are dropped in a web-accessible directory,
you should do a cflocation rather than a cfcontent output.
That way you can do whatever processing you want before, and hand over the work
to the web-server (doing what it does best - serving static content), instead
of occupying a thread in cfmx with just outputting something. Not so important
for small images, but anyways.
Web browsers don't seem to have any problem at all with that (from just a quick
test) -- they happily go through the request and receives the 302 header to the
new location, and load+display the image.
Another thing: This way you don't have to worry about setting the proper mime
type headers, the web server should do that automatically.
-----Original Message-----
From: Jared Rypka-Hauer - CMG, LLC [mailto:[EMAIL PROTECTED]
Sent: Mon 2005-05-16 22:42
To: CF-Talk
Cc:
Subject: Re: cfcontent vs cflocation
<puzzled>
Hugo... ummm...
CFLOCATION to where? CFLOCATION does a client-side redirect via headers
(similar to a meta redirect).
CFCONTENT sets the mime type of the content stream that gets returned
to the
browser (hence making a CFM template look like a JPG or a PDF).
Perhaps I'm missing something obvious, but I don't see how their
functionality could be analagous.
Maybe a bit more explanation?
Laterz,
J
</puzzled>
On 5/16/05, Hugo Ahlenius <[EMAIL PROTECTED]> wrote:
>
> Related to the IE hack thread:
>
> When you do the little trick and refer to a cfm template in an <img>
tag
> (for instance) to enable some logic processing (or rendering of a
> dynamic image) -- wouldn't it make much more sense to do a cflocation
> after the dynamic rendering? (as long as you don't need to play with
any
> custom headers)
>
> I just realized that this would work for some dynamic image generation
> (arcims) where the images would be stored on a web-accessible drive
> anyways -- and that this would enable some very good caching of
dynamic
> images as well...
>
> /H.
>
--
---------------
-------------------------------------
Buy SQLSurveyor!
http://www.web-relevant.com/sqlsurveyor
Never make your developers open Enterprise Manager again.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:206807
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54