Cookie issue ($Version)

Discussion in 'Web Design and Development' started by SilentPanda, Jul 23, 2009.

  1. SilentPanda Moderator emeritus

    SilentPanda

    Joined:
    Oct 8, 2002
    Location:
    The Bamboo Forest
    #1
    A site I'm working on in PHP is having some issues with cookies with the Kindle web browser.

    I'm printing out the cookies using print_r($_COOKIE) and in Firefox everything looks fine (and it works fine). However on the Kindle the cookie appears slightly different.

    It has a named array index "[$Version] => 0". Also all my cookie values have the following attached to the end of them; ", $Version=0". So when I go to retrieve them they aren't what I expect them to be. I imagine this is the issue with the site. It's fairly trivial to remove the ", $Version=0" off but I'm curious if anybody knows why it might be putting it there? If it's a side effect of the $Version index I'd rather just figure out a way for that to stop happening.

    I guess it could be user agent related (it's not my code) but I did grep for Version=0 and didn't get any results. It does look like the code is using YUI from Yahoo.

    This RFC also seems to mention something about Version... http://www.ietf.org/rfc/rfc2109.txt

    I'm not well versed in web stuff but thought maybe some of you might have encountered this or at least know why the browser might be doing this.

    Edit: I just spoofed the user agent in Safari to the Kindles and it works the same as Firefox... :( So probably nothing to do with the user-agent.
     
  2. Unspoken Demise macrumors 68040

    Unspoken Demise

    Joined:
    Apr 16, 2009
    Location:
    >9,000
    #2
    Chocolate chip. Cant go wrong.
    Sorry,

    ---->Tech Stuff



    ---->My Head.
     
  3. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #3

Share This Page