#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2003
    Posts
    29
    Rep Power
    0

    Path in JavaScript cookie doesn't work?


    I've read everything I can find about paths in JS cookies, and it seems perfectly straightforward. But I can't seem to make it work.

    On a page in /commerce, I put this:

    document.cookie = "ControlFlow=Forward;path=/;"

    After that, I use ASP to do this:

    Response.Redirect "/test/see_cookies.asp"

    In /test/see_cookies.asp, I have this:

    document.writeln( document.cookie );

    Pretty straightforward, huh? But in see_cookies.asp, I see other cookies but not the ControlFlow cookie that I set in the /commerce page.

    Can you see anything I'm doing wrong? Can you think of anything that could unintentionally trash a cookie as I redirect to another page?

    Interesting note: When I examine document.cookie immediately after writing to it in the first program, here's what I see:

    TableEditor8=RememberMe=true&UserName=xxxxxx; ASPSESSIONIDGGQQQNEU=KOMNHPBBGLJIIJBLFGFOCAKP; ControlFlow=Forward

    Notice that the cookie I added appears AFTER the ASP session ID. Could that be causing a problem? If so, how to I prevent the problem?

    Thanks!

    Charlie
    Last edited by cdarling; March 21st, 2003 at 12:48 PM.

IMN logo majestic logo threadwatch logo seochat tools logo