Copy link to clipboard
Copied
Hi. I'm losing session cookies in Safari and can't figure out why. ColdFusion 10. It's not happening on every browser. I am capturing the cookies and user agent when this happens. The strange thing is, one of the user agents matches my iPad 3 exactly, but it works fine on my iPad. All cookies are written and maintain their values correctly, except CFID and CFTOKEN, which change on every click. I've tried changing my Safari settings to Do Not Track, and Allow Cookies only on sites I visit. It still works fine.
Any clues? Can I try setting the cookies manually in Application.cfc? What is the best way to code this?
Thanks in advance,
Bud
Copy link to clipboard
Copied
Does your Application.cfc file have settings like the following?
<cfcomponent>
<cfscript>
this.name = "CF_Appl";
this.applicationTimeout = "#createTimespan(1,0,0,0)#";
this.loginStorage = "session";
this.sessionManagement = "true";
this.sessionTimeout = "#createTimeSpan(0,0,30,0)#";
this.setClientCookies = "true";
this.scriptProtect = "all";
</cfscript>
</cfcomponent>
Could you show us your code for Application.cfc?
Copy link to clipboard
Copied
The Application.cfc has a lot of irrelevant code, but these are the Application.cfc specific settings:
this.applicationtimeout="#createtimespan(1,0,0,0)#";
this.name = variables.config.applicationName;
this.sessionmanagement=true;
this.sessioncookie.disableupdate = true;
this.sessioncookie.timeout = "-1"; // -1 makes session only cookies.
this.setdomaincookies = true;