Dear Old-Timers, You CAN put cfcookie and cflocation on the same page
Every once-in-a-while I still see/hear people perpetuating the false statement that in ColdFusion you cannot put CFCOOKIE and CFLOCATION on the same page because the cookie will not get set due to the relocation. I even saw one today.
This is FALSE
A long, long, long, long time ago, this was true. But for the last 10 YEARS it has not been. This behavior was changed in CF6 (2002, I think).
So all you old-timers who are still spreading this falsity, knock it off.
Thanks,
Jason
Reference: CFWACK 7 Page 1008





--
Adam
Thanks for that clarification. It never occurred to me to think anyone would ever expect that to work based on what I said. But, of course, you are right. I would not expect any code on the page to do anything after a cflocation, so I didn't think to point that out.
From the "Useless Information Dept". I've been able to demonstrate setting a cookie *after* a CFLOCATION call: http://adamcameroncoldfusion.blogspot.co.uk/2012/0.... It relies on a bug in CF9.0.1 though.
Cheers.
--
Adam
Cheers.
--
Adam