Skip to main content
Participant
Aug 16, 2016 12:36 PM UTC
Question

Losing Sessions in Safari

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

This topic is closed to new replies. Start a new post to keep the conversation going.

2 replies

BKBK
Community Expert
Community Expert
Aug 16, 2016 8:15 PM UTC

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?

Translate
BuddyAuthor
Participant
Aug 17, 2016 12:12 PM UTC

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;

Translate