Trouble Setting Cookies

Andre Garzia andre at andregarzia.com
Sun Aug 15 19:35:37 EDT 2010


> Go to  http://pareto.on-rev.com/setcookie.irev
>
> This page has a one-button form that sets a cookie by calling a script
> called sSetCookie.irev.  The cookie's name is testCookie and it's value is
> 666.  Here is the script.
>
> <?rev
> put "Set-Cookie:" && "testCookie" & "=" & 666 & ";path=/" into theCookie
> put new header theCookie
>
> put url ("file:cookieResult.html") into thePage
>
> put "Done."  && the long date && the long time into theMessage
> replace "{message}" with theMessage in thePage
> put thePage
> ?>
>

Gregory,

The POST operation is not setting the cookie. As you can see here:

  http://andregarzia.com/shots/Cookie_Result-20100815-203217.jpg

The set-cookie header is not coming thru. Try loosing the path part, it
might be confusing the browser.

Tricky tricky tricky.

:-/

(PS: also try put header instead of put new header)



-- 
http://www.andregarzia.com All We Do Is Code.



More information about the use-livecode mailing list