Skip to main content
Inspiring
January 17, 2009
Question

Cookie Problem - CF Bug?

  • January 17, 2009
  • 1 reply
  • 413 views
I have a strange problem writing cookies.

A demo is running at http://www.aspirenet.com/frame.cfm

Here's the thing, 3 CFM pages, frame.cfm --> frame2.cfm --> frame3.cfm

Frame.cfm sets up a frame and passes a LP variable in the URL to frame 2

Frame2.cfm writes a cookie, and uses METAREFRESH to go to frame3.cfm

Frame3.cfm --> displays the cookie

it all works, unless, the first page frame.cfm is on a different domain, when it gets to the last page, the cookie is not present,

Even though on frame2.cfm I CFABORT it and find that the URL variable does indeed exist

Is this a possible CF bug?

Thanks

Mark
This topic has been closed for replies.

1 reply

Participating Frequently
January 17, 2009
You can't set cookies on domains different than where the page loaded from.
Pages don't get cookies from different domains.

You say:
"it all works, unless, the first page frame.cfm is on a different domain, when it gets to the last page, the cookie is not present"
In this scenario, what domain am I accessing in my browser? What is the frame src of frame2.cfm? What domain are you trying to set the cookie on in frame2.cfm? What domain are you sending in the METAREFRESH to load frame3.cfm?

This has nothing to do with CF. This is simple HTTP and how cookies work.