Advertisement

02.27.2008 at 08:01AM PST, ID: 23197270
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.2

Losing Cookies/Sessions with IE Browsers

Asked by AD_Tech in ColdFusion Application Server, Internet Explorer Web Browser, E-Commerce

Tags: ,

I was just wondering if anyone here have experienced the same situation I'm in
right now. In a nutshell, I'm noticing on my ecommerce website the cookie holding
the shopping cart ID is being dropped after several clicks through the website
only with IE browsers. With the same code, it works just fine with
FireFox/Netscape browers.

Here's how my database driven shopping cart works on my site. In the
Application.cfm I have these lines of code:

<!--- -------------------------------------------------------------------- --->
<!--- SHOPPING CART RELATED FUNCTIONS START HERE  --->
<!--- -------------------------------------------------------------------- --->

<cfif NOT IsDefined("COOKIE.LastCartID")>
      <!--- Set a cookie if the user decides to purchase later --->
      <cfset newCCID = #CreateUUID()#>
      <cfcookie name="LastCartID" value="#newCCID#">
      <!--- Insert tracking variables here  --->
      <cfquery username="#application.qryUserName#" password="#application.qryPassword#" name="checkTransID" datasource="#Application.DSN#" dbtype="ODBC">
            SELECT            OrderTransID
            FROM            tblOrderTransactions
            WHERE            OrderTransID = '#SESSION.CFTOKEN#'
      </cfquery>
      <!--- If no record, create new order transaction ID  --->
      <cfif CompareNoCase(checkTransID.RecordCount,1)>
            <cfquery username="#application.qryUserName#" password="#application.qryPassword#" name="createEZaccount" datasource="#Application.DSN#" dbtype="ODBC">
            INSERT INTO tblOrderTransactions(OrderTransID,CustIP)
            VALUES('#SESSION.CFTOKEN#','#CGI.REMOTE_ADDR#');
            </cfquery>
      </cfif>
      <!--- Create CartID in SESSION var  --->
      <cflock timeout="30" throwontimeout="No" name="#SESSION.SessionID#" type="EXCLUSIVE">
            <cfset SESSION.CartID = COOKIE.LastCartID>
      </cflock>
      
      
</cfif>
      
<cfif NOT IsDefined("SESSION.CartID")>
      <cflock timeout="30" throwontimeout="No" name="#SESSION.SessionID#" type="EXCLUSIVE">
            <cfset SESSION.CartID = COOKIE.LastCartID>
      </cflock>
</cfif>

<cfparam name="thisCartID" default="#COOKIE.LastCartID#">
<!--- -------------------------------------------------------------------- --->
<!--- -------------------------------------------------------------------- --->

A first time visitor will have a new cart ID created and saved to a cookie
(COOKIE.LastCartID) and to a session variable (SESSION.CartID). Once the mini
shopping cart is reached, a query is made to the cart database to find contents
of the cart and will display the data. New customers will return 0 contents
obviously but returning customers who added items in a previous session will
display as such. Now, what I noticed is after adding an item to the cart and
making about 20 or so click throughs on the site, the cart returns 0 items and
with my debugging code on, a whole new cookie ID is created as well as other
session variables (CFID, CFTOKEN, etc.). Using the cfdump feature, I was able to see right before a new cookie.LastCartID is created, new session and cookies for CFID & CFTOKEN are generated.

I'm just wondering if anyone else experienced this and what strategies should I
undertake to resolve this. This is an issue specific to IE browsers. Thanks.

OrlandoStart Free Trial
[+][-]02.28.2008 at 03:49PM PST, ID: 21009455

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.29.2008 at 05:08AM PST, ID: 21012810

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.06.2008 at 11:39AM PST, ID: 21063889

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.05.2008 at 05:34AM PDT, ID: 21718586

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: ColdFusion Application Server, Internet Explorer Web Browser, E-Commerce
Tags: Microsoft, Internet Explorer
Sign Up Now!
Solution Provided By: AD_Tech
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628