cookies

Discussion in 'Javascript' started by JS, Nov 15, 2005.

  1. JS

    JS Guest

    Hi,
    I have problem using cookies in Firefox.
    I have two pages. On first page I am setting a cookie, first by clearing
    it out like this
    document.cookie = "test=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT";
    document.cookie = "test; expires=Thu, 01-Jan-1970 00:00:01 GMT";

    then setting cookie like this
    document.cookie = "test=" + document.val1.list[0].value + ";expires=Wen,
    01-Mar-2006 00:00:01 GMT;domain=www.somewhere.com";

    then I submit the form on first page to another server on another
    domain. This server stores values from the form and then loads second
    page from server that has both pages.

    The problem is that when I try reading "test" cookie on second page, in
    Firefox, I get nothing. In Internet Explorer I get value for "test" cookie.

    What is going on? Is this a security issue?
     
    JS, Nov 15, 2005
    #1
    1. Advertising

  2. Double check your setting in Firefox. It has a setting for cookies that restricts cookie access to "originating site only".

    JS wrote:
    > Hi,
    > I have problem using cookies in Firefox.
    > I have two pages. On first page I am setting a cookie, first by clearing
    > it out like this
    > document.cookie = "test=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT";
    > document.cookie = "test; expires=Thu, 01-Jan-1970 00:00:01 GMT";
    >
    > then setting cookie like this
    > document.cookie = "test=" + document.val1.list[0].value + ";expires=Wen,
    > 01-Mar-2006 00:00:01 GMT;domain=www.somewhere.com";
    >
    > then I submit the form on first page to another server on another
    > domain. This server stores values from the form and then loads second
    > page from server that has both pages.
    >
    > The problem is that when I try reading "test" cookie on second page, in
    > Firefox, I get nothing. In Internet Explorer I get value for "test" cookie.
    >
    > What is going on? Is this a security issue?
     
    Dennis Willson, Nov 15, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alex Nitulescu

    Response.Cookies vs Request.Cookies

    Alex Nitulescu, Feb 3, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    8,618
    Hans Kesting
    Feb 3, 2005
  2. Andy Fish
    Replies:
    3
    Views:
    6,600
    Fredrik Lindner
    Nov 6, 2003
  3. user
    Replies:
    3
    Views:
    695
    =?ISO-8859-1?Q?G=F6ran_Andersson?=
    Mar 31, 2007
  4. archana
    Replies:
    1
    Views:
    536
  5. _Who
    Replies:
    7
    Views:
    2,768
Loading...

Share This Page