[thelist] cflocation woes
Aaron Johnson
ajohnson at mindseye.com
Mon Jun 11 09:45:10 CDT 2001
hi Aaron,
Internally <cflocation> is sending a status code 302 to the browser and then
shoving the user to the new page... you can replicate this using CFHEADER
*AND* you can set a cookie:
<!--- set your cookie --->
<cfcookie name="myChocolateChipCookie" value="#someid#">
<!--- now redirect the user to some page --->
<cfheader statuscode="302" statustext="Object Temporarily Moved">
<cfheader name="location"
value="http://#cgi.server_name#/default.cfm?asjksj=#createUUID()#">
You'll notice that I append a unique key to the redirect page. Nutscrape has
a nasty habit of actually showing the "Object Temporarily Moved" message to
end users, appending a unique key cures this.
HTH
Aaron Johnson, MCSE, MCP+I
Allaire Certified ColdFusion Developer
MINDSEYE, Inc.
<phn>617.350.0339
<fax>617.350.8884
<icq>66172567
ajohnson at mindseye.com
> -----Original Message-----
> From: thelist-admin at lists.evolt.org
> [mailto:thelist-admin at lists.evolt.org]On Behalf Of Aaron Cole
> Sent: Monday, June 11, 2001 12:30 AM
> To: thelist at lists.evolt.org
> Subject: [thelist] cflocation woes
>
>
> I'm currently building a password-protected site that utilizes a simple
> cookie to track the user's id.
>
> The index page has a form for the user to enter her
> username/password. The
> action page then performs an INSERT and sets a <cfcookie>.
>
> I finish off the action page with a <cflocation> which points back to the
> index page.
>
> For some reason the index page doesn't recognize the cookie.
> However, if I
> comment out the <cflocation> and use a simple href on the action
> page that
> has to be manually clicked, no problem.
>
> I thought it was a caching problem, but neither refreshing nor adding a
> <META HTTP-EQUIV="Expires" CONTENT="0"> tag does the trick.
>
> I'm at a loss. Can anyone point me in the right direction?
>
> TIA,
> Aaron
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com
>
>
> ---------------------------------------
> For unsubscribe and other options, including
> the Tip Harvester and archive of TheList go to:
> http://lists.evolt.org Workers of the Web, evolt !
More information about the thelist
mailing list