6 Replies Latest reply on Jun 4, 2014 11:51 AM by BKBK

    Losing cookie data


      I've inherited a ColdFusion site (CF5), despite no background in CF, but have been tasked with making a change to the behavior of the site. I'm running into a problem with cookies, though.

      A site on another domain is linking to this site and includes a query string. Now I'm checking for that value (a zip code) in the index.cfm file and storing it in the cookie and that seems to be working fine. I looped through the cookie collection and dumped the results, and the zip code was there. So at this point, all is well.

      But then the user clicks on a button, which reloads the index.cfm file with a different <include>, and the cookie no longer has any values other than CFID and CFTOKEN. This was confirmed by looping through the cookie collection, and later by Fiddler.

      Client storage is set to cookie, and I can't find anywhere in the index.cfm, application.cfm, or the included files where the cookie is being set to expire.

      Here's the line that's storing the value:

           <cfcookie name="ZC_Zip" value="ZC.ZC_Zip#" expires="NEVER">

      What else should I be looking for to figure this out?