Hi Folks,

I have a cookie dupication problem that I cannot get my head around. This is
a duplication of my thread on cf-aussie, so apologies to those who are
seeing this twice.

See this page for example.

http://www.biowishtechnologies.com/au/information/our-company1/senior-management-team/lorenzo-gella/

If you click through a few pages on this site, then view the cookies that
have been set for it you will see they have been multiplied a lot of times,
I am guessing unnecessarily. I believe these cookies should be set only once
in the root of the site. This happens for the CF and Google Analytics
cookies.

This issue appears to occur on CF9 in development and in CF8 on live. I have
tried different combinations of cfcookie and settings but nothing seems to
stop it happening. I believe that this issue is causes Internet Explorer
users to receive a blank page every now and again because the limit on the
number of cookies is being reached.

In our application.cfc we have used this code in onRequestStart() to set
UID, and cf vars <cfcookie name="UUID" value="#createUUID()#"
expires="never">
<cfcookie name="cfid" value="#Client.cfid#">
<cfcookie name="cftoken" value="#Client.cftoken#">

I have tried to use domain="www.biowishtechnologies.com" path="/" but it
makes no difference.

The application is set out like this:

<cfset this.sessionManagement = true>
    <cfset this.clientManagement = true>
    <cfset this.setClientCookies = false>
    <cfset this.sessionTimeout = CreateTimeSpan(0,0,30,0)><!--- 30 minutes
--->
    <cfset this.applicationTimeout = CreateTimeSpan(31,0,0,0)><!--- 31 days
--->

We have also removed all cfcookie tags, and then CF set the jsessionid in a
cookie. This has no change. We also moved the cookie tags into the
onSessionStart, but again no difference.

I put some logging in to my on session start and on app start, and here is
what I found:

application set as follows:

    <cfset this.sessionManagement = true>
    <cfset this.clientManagement = true>
    <cfset this.setClientCookies = false>
    <cfset this.sessionTimeout = CreateTimeSpan(30,0,30,0)><!--- 30 minutes
--->

    <cfset this.applicationTimeout = CreateTimeSpan(31,0,0,0)><!--- 31 days
--->

creates one jsessionid cookie & 4 x GA cookies _utma _utmb _utmc _utmz (all
in lowercase)

go to a sub page

get an extra 2 x jsessionid cookies, 2 more sets of GA cookies but this time
the names are in uppercase

go to a third page

I get 3 more jsessionid cookies (now a total of 6, and now have a set of 8
utma cookies.

The logging suggests that the session stays, and that the onsessionstart is
only called once.

"Information","jrpp-11","09/16/10","13:06:45","LOCAL.BIOWISH.LOCAL","running
app new session"
"Information","jrpp-11","09/16/10","13:06:45","LOCAL.BIOWISH.LOCAL","running
app on req start"

"Information","jrpp-11","09/16/10","13:07:35","LOCAL.BIOWISH.LOCAL","running
app on req start"

"Information","jrpp-11","09/16/10","13:08:29","LOCAL.BIOWISH.LOCAL","running
app on req start"

-- 

The exact same thing is happening on live with the GA cookies too. This
leads me to think its not about the CF code. Why would the Google Analytics
cookies be replicated and increased each request?

Thanks!

-- 
Duncan I Loxton
duncan.lox...@gmail.com


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:337158
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to