[ic] read-cookie and set-cookie on same page

Kevin Walsh interchange-users@interchange.redhat.com
Sat Mar 30 21:15:01 2002


> 
> I'm having a few problems with cookies.
> 
> I have a test-page with a simple set-cookie tag:
> [set-cookie name="test"
>             value="[calc][read-cookie test]+1[/calc]"
>             expire="Fri, 31-May-2002 23:59:59 GMT"
>             domain="__SERVER_NAME__"
>             path="/" ]
> 
> This works fine when I'm loading the page for the first time (or in a fresh
> browse-window), but if I refresh the page, IC does not more respond.. I have
> to open a new browser-window and enter that page again to get that cookie
> set.
> 
> Is there any tricks in setting cookies, like where in the html-code the
> set-cookie command should be placed? I have this code just in the middle of
> my html-code, and it works on the first try just fine, but hangs on a
> refresh...
> 
I just tried this on my test macbine:

    [set-cookie name="test"
            value="[calc][read-cookie test]+1[/calc]"
            expire="Fri, 31-May-2002 23:59:59 GMT"]
    [read-cookie test]

The page showed the previous value of the cookie each time I
reloaded the page, as expected.

My browser was configured to throw away new cookies on exit,
so it didn't work across sessions until I enabled the facility.
I've disabled it again now.

-- 
   _/   _/  _/_/_/_/  _/    _/  _/_/_/  _/    _/
  _/_/_/   _/_/      _/    _/    _/    _/_/  _/   K e v i n   W a l s h
 _/ _/    _/          _/ _/     _/    _/  _/_/    kevin@cursor.biz
_/   _/  _/_/_/_/      _/    _/_/_/  _/    _/