Ahh thanks Matt -- I'd forgotten about that -- yea, some folks use
cfheader themselves to accomplish the redirect, which is similar to
using cflocation. The difference is that with a cfheader tag (I think
it's "status" with a value of "302" but that's not really my forte)
won't also terminate the request, so the request would then continue
on to deliver the file in theory. Though I don't personally know if
the cfcontent tag will also change the status header that's required
for the relocation or if there might be other complications owing to
the standard or implementation of HTTP, since the cflocation tag
officially creates a "these aren't the files you're looking for"
message and sends the browser on to another place to get them -- so
the webserver and/or browser may (or may not) interpret the
cfcontent'ed file as being "not the file you're looking for" and not
download the file.

You'd have to test it. :)

> You can't use cflocation or cfheader after cfcontent, but
> you can use
> cfheader before cfcontent. Thus, you can issue a redirect
> with cfheader and
> still use cfcontent.

> -Matt

>> -----Original Message-----
>> From: [EMAIL PROTECTED]
>> [mailto:[EMAIL PROTECTED]
>> On Behalf Of S.Isaac Dealey
>> Sent: Monday, August 30, 2004 10:23 PM
>> To: CF-Talk
>> Subject: Re: redirect after cfheader/cfcontent
>>
>> > I have a code on a page that pop up a save/open for
>> > downloading a page :
>>
>> > <cfheader name="Content-Disposition"
>> > value="attachment;filename=#getfilefrompath(cas.fichier
>> > )#">
>> > <cfcontent file="#nom_fichier2#"
>> > type="application/pdf"
>> > deletefile="No" />
>>
>> > And I want to redirect the page to another page after
>> > this.. how could I do
>> > this? I'm on CF5 and I tried a cflocation after those 2
>> > tags but it didn't
>> > work.

s. isaac dealey     954.927.5117
new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework

http://www.sys-con.com/story/?storyid=44477&DE=1
http://www.sys-con.com/story/?storyid=45569&DE=1
http://www.fusiontap.com
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to