• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Odd cookie expiration behaviour (Safari related?)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Odd cookie expiration behaviour (Safari related?)


  • Subject: Odd cookie expiration behaviour (Safari related?)
  • From: Mark Gowdy <email@hidden>
  • Date: Fri, 12 Jun 2009 18:26:46 +0100

Hello, 

We use cookies to do various tracking talks.  
When we added a new cookie (with a shorter expiration time than we would normally use), we noticed something odd:

In Firefox, it was working as expected.
In Safari it was not appearing at all.

On closer inspection, we noticed that he cookie expiration time was odd.

This is some test code I am using (in Session's appendToResponse) is:

  private static int i = 0;
  ....
  a_rsp.addCookie(new WOCookie("key_a_" + i, "someValue" + i,   "/", null, 31104000, false)); // 31104000 seconds = ~12 months
  a_rsp.addCookie(new WOCookie("key_b_" + i, "someValue" + i++, "/", null,  7776000, false)); //  7776000 seconds =  ~3 months


In Firefox, these cookies appear as expected:
----- Click ----
key_a_0 = 0 (expires in 1 year)
key_b_0 = 0 (expires in 3 months)
----- Click ----
key_a_1 = 1 (expires in 1 year)
key_b_1 = 1 (expires in 3 months)


In Safari, it goes weird (to view these, go to Preferences - Security tab, and click 'show cookies' - it updates in real time)
----- Click ----
key_a_0 = 0 (expires in 12 days)
----- Click ----
key_a_1 = 1 (expires in 12 days)

(no sign of key_b_x)

This happens if you are using Direct Connect (when developing) and on a live server (with Apache, etc...)

Am I doing something wrong, or is Safari like some kinda crazy thing?

Mark

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Odd cookie expiration behaviour (Safari related?)
      • From: Mike Schrag <email@hidden>
  • Prev by Date: Hudson Setup
  • Next by Date: Re: Migrations encoding
  • Previous by thread: Re: Hudson Setup
  • Next by thread: Re: Odd cookie expiration behaviour (Safari related?)
  • Index(es):
    • Date
    • Thread