Results 1 to 7 of 7

Thread: Vanishing cookies

  1. #1

    Thread Starter
    Hyperactive Member thebloke's Avatar
    Join Date
    May 2003
    Posts
    358

    Vanishing cookies

    Guys

    I have a cookie problem. I set a cookie:

    VB Code:
    1. response.cookies("agentcode") = section
    2. Response.Cookies("agentcode").Expires= Date + 30

    and if I retrieve it straight away then it's there:

    VB Code:
    1. response.write request.cookies("agentcode")
    2. response.end

    However I then use response.redirect to send it to another page then I try to retrieve the cookie at the very top of that page and it's empty.

    I've tried this on a few machines and different browsers.

    Any ideas?!
    The Bloke
    www.blokeinthekitchen.com
    making cooking cool for blokes

  2. #2

    Thread Starter
    Hyperactive Member thebloke's Avatar
    Join Date
    May 2003
    Posts
    358

    Re: Vanishing cookies

    ....anyone?!?
    The Bloke
    www.blokeinthekitchen.com
    making cooking cool for blokes

  3. #3
    Hyperactive Member
    Join Date
    Jan 1999
    Location
    North East America
    Posts
    463

    Re: Vanishing cookies

    I am not big on cookies but as I understand it a redirect wont send the cookie to another page, I think you have to request that cookie again... I know there is away to keep the cookie alive I am not sure that redirect is it?
    TMacPherson
    MIS Systems Engineer
    [email protected]


  4. #4
    Addicted Member
    Join Date
    Jul 2004
    Location
    Mumbai
    Posts
    236

    Re: Vanishing cookies

    TroyMac : Actually when you write Cookies using response object then it will be written in the client's computer. after that any asp page of that domain should be able to read it unless they are expired. i don't know why his does not work but, i tried the same code which thebloke wrote. it works fine in my system.

    thebloke : properties like path, or secure may restrict the cookies to be read by pages of certain directories or https protocol respectively(i just refered a book now). but i don't think they will be set off in any iis by default. so hope no need to wander thru them.

    have you tried cookies with some other pages. try with some other virtual directory to check cookies are working. hope all your browsers are set to accept cookies.
    Last edited by kishore.kr; Aug 6th, 2005 at 02:31 AM.
    --Kishore...

  5. #5
    Fanatic Member kaihirst's Avatar
    Join Date
    Jul 2005
    Location
    The Resaurant At the End of The Universe
    Posts
    633

    Re: Vanishing cookies

    Hi

    If your looking for some thing to transer informational variables to otyher pages, or just to transfer information (such as a shopping car to a HTTPS server, then back again) you could use querystrings...

    Cookies a page specific not ip specific, and if you have an aol user, you knackered!!!!

    sue query strings, much easier on the code, user and browswer.

    ta

    kai

  6. #6
    Addicted Member
    Join Date
    Jul 2004
    Location
    Mumbai
    Posts
    236

    Re: Vanishing cookies

    kaihirst :
    Cookies a page specific not ip specific, and if you have an aol user, you knackered!!!!
    are you sure cookies are page specific.
    cookies does have disadvantages., like when users browser does not accept cookies. if you have noted thebloke's code then he wants to store a information in clients computer for 30 days. so it can't be performed with querystring. so cookies are one of the prefered choice there.

    and i think cookies are not page specific.
    --Kishore...

  7. #7

    Thread Starter
    Hyperactive Member thebloke's Avatar
    Join Date
    May 2003
    Posts
    358

    Re: Vanishing cookies

    Quote Originally Posted by kishore.kr
    kaihirst :
    and i think cookies are not page specific.
    No, they're not.

    I think the problem may be firewall related....I'm still checking...
    The Bloke
    www.blokeinthekitchen.com
    making cooking cool for blokes

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width