in reply to Re: setting a cookie via an image
in thread setting a cookie via an image

In the original question I stated that I needed a conditional to check if the information is already there - otherwise reloading the page would overwrite the original information. there is nothing sinister about it at all.

Why do I need the information? A lot of users to that page are referred and I need to keep track of where they came from. But if they take a look around the site and reload that page then the original information is lost as a new cookie is set

I added the header but it didn't make a difference - thanks anyway

Replies are listed 'Best First'.
Re^3: setting a cookie via an image
by Joost (Canon) on Aug 28, 2004 at 14:10 UTC
Re^3: setting a cookie via an image
by tachyon (Chancellor) on Aug 29, 2004 at 02:02 UTC

    It sounds like you simply have a broken implementation of intrasite user tracking. The usual logic is:

    if ! tracking_cookie make new session ID log referer, browser, blah as initial data add entry page to track log for session ID send cookie with session ID when returning page else add page to track log for session ID

    Once you have set a cookie (with a session ID) reloading a page will still send that cookie to you provided the path is correct.

    cheers

    tachyon