1 Reply Latest reply on Feb 1, 2014 3:58 AM by BKBK

    cfcookie problem between computers


      I am migrating websites from a server using CF 8 to a new one using CF 10. In this one site, I have a query that looks up talent and then writes the resulting list to a cfcookie. On my computer with any browser it works correctly. My client uses the same browser as I normally use (Safari) and his browser is not updating the cfcookie with the new talent list after a search. They are very unhappy making me unhappy also. Any ideas as to what might be causing this problem.


      In the application.cfm (yes, I know I should be updating to cfc but not enough hours in the day):





                SESSIONTIMEOUT=" #createTimeSpan(0,0,30,0)#"

                APPLICATIONTIMEOUT=" #createTimeSpan(0,1,0,0)#"



      Setting the cfcookie:


      <cfif isdefined('getTalent.recordcount') and getTalent.recordcount gt 0>

               <cfcookie name="tSearch" value="#valueList(getTalent.talentID)#" expires="1">


        • 1. Re: cfcookie problem between computers
          BKBK Adobe Community Professional & MVP

          My guess is that the cookie tag fails to run. The reason is that the variable getTalent.recordcount is undefined. In any case, this points to a potentially bigger problem.


          It appears from your description that the query getTalent depends on the user. You should therefore scope it accordingly. For example, wherever the variable getTalent occurs, including in the cfquery tag that defines it, you should change it to session.getTalent.


          Also, if only just to tidy things up, I would delete the spaces in the definitions of sessionTimeout and applicationTimeout. I would also set the value of applicatonTimeout to createTimeSpan(1,0,0,0). After all, the cookie is valid for up to a day.