How can we access the cookie set by cfheader in the same request?

Discussion in 'Programming' started by hrjk, Jan 19, 2010.

  1. #1
    I've set a cookie in my application.cfm using cfheader and in the same request i need to access the cookie. How can i do this?
     
    hrjk, Jan 19, 2010 IP
  2. cfStarlight

    cfStarlight Peon

    Messages:
    398
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    A) If you set the cookie in code ...you already know what the value is ;)

    B) The cookie won't actually be set until AFTER the the request is finished. So while you won't get an error, trying to access the value in the same request is inaccurate and rather pointless because you've no idea whether the cookie was actually set or not ...
     
    cfStarlight, Jan 20, 2010 IP