Trouble Setting Cookies

Jeff Massung massung at gmail.com
Sun Aug 15 20:11:39 EDT 2010


Just in case it hasn't been mentioned already (I haven't really been
following the thread closely), put header has to be used before *any* other
put commands.

Jeff M.

On Sun, Aug 15, 2010 at 6:35 PM, Andre Garzia <andre at andregarzia.com> wrote:

> > 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.
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



More information about the use-livecode mailing list