Trouble Setting Cookies

Andre Garzia andre at andregarzia.com
Sun Aug 15 19:20:42 CDT 2010


Jeff,

If I remember correctly it can be used after some other put but not after
the first ?> sign, the first ?> is what triggers the start of the output
process by that time, all the put headers need to be in the output queue.

:D

On Sun, Aug 15, 2010 at 9:11 PM, Jeff Massung <massung at gmail.com> wrote:

> 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
> >
> _______________________________________________
> 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
>



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



More information about the use-livecode mailing list