Re: [WebDNA] setcookie then redirect
This WebDNA talk-list message is from 2013
It keeps the original formatting.
numero = 110369
interpreted = N
texte = This is a multi-part message in MIME format.--------------030305010904040707090107Content-Type: text/plain; charset=ISO-8859-1; format=flowedContent-Transfer-Encoding: 7bitWebDNA 6.2 / CentOS 5.9 / Apache 2.2.3This code works for me (always has):index.html--------------------[setcookie name=loginCookie&value=0000000000&expires=[date %A, %d-%b-%Y][time %X]GMT][redirect new-page.html]new-page.html----------------------[if [GETCOOKIE name=loginCookie]^0000000000][then]it works[/then][else]it doesn't work[/else][/if]-Dan StrongNew World Creative LLChttp://www.NewWorldCreative.comOn 5/3/2013 2:17 AM, Psi Prime Inc, Matthew A Perosi wrote:> Actually I'm not too sure of this. In my experience, when [redirect] > is found in a script it will trigger a redirect on the client side > without sending anything else down to the browser.>> I've not tested this behavior in 6.x or 7.x, but in years past I > always had to manually set the cookie values as variables at the same > time they are being set in the browser. In subsequent refreshes > (without the use of a redirect) the cookie information would be > available with [getcookie].>> Remember, that cookie information is sent back to the server during > the initial request for the next page. They get set as part of the > header information during a 200 response as the next page is being > loaded. This is why you can't use [setcookie] at the beginning of your > script and then expect [getcookie] to return results later in the same > script.>> -Matt>>> On 5/2/2013 10:42 PM, Dan Strong wrote:>> I'm pretty sure that as long as you set the cookie before the >> redirect then the cookie will stick.>> -Dan Strong>> New World Creative LLC>> http://www.NewWorldCreative.com>> On 5/2/2013 7:39 PM, Steve Graham wrote:>>> Hello I have a quesion, can i setcookie then redirect to another >>> page? Will the cookie save in the browser or will redirect make the >>> cookie not save? Are there other conditions to make cookie not save?>>> --------------------------------------------------------- This >>> message is sent to you because you are subscribed to the mailing >>> list . To unsubscribe, E-mail to: archives: >>> http://mail.webdna.us/list/talk@webdna.us Bug Reporting: >>> support@webdna.us >>>> --------------------------------------------------------- This >> message is sent to you because you are subscribed to the mailing list >> . To unsubscribe, E-mail to: archives: >> http://mail.webdna.us/list/talk@webdna.us Bug Reporting: >> support@webdna.us>> -- >> Matthew A Perosi>> Corporate Consultant>> Mobile Marketing Expert>> Senior Web Developer>> SEO Analyst & Educator>> matt@psiprime.com>>>> Psi Prime, Inc.>> 323 Union Blvd.>> Totowa, NJ 07512>>>> Direct: 888.872.0274>> Fax: 888.488.5924>>>> http://www.perosi.com> --------------------------------------------------------- This message > is sent to you because you are subscribed to the mailing list . To > unsubscribe, E-mail to: archives: > http://mail.webdna.us/list/talk@webdna.us Bug Reporting: > support@webdna.us --------------030305010904040707090107Content-Type: text/html; charset=ISO-8859-1Content-Transfer-Encoding: 7bit
WebDNA 6.2 / CentOS 5.9 / Apache 2.2.3
This code works for me (always has):
index.html
--------------------
[setcookie name=loginCookie&value=0000000000&expires=[date %A, %d-%b-%Y][time %X]GMT]
[redirect new-page.html]
new-page.html
----------------------
[if [GETCOOKIE name=loginCookie]^0000000000]
[then]it works[/then]
[else]it doesn't work[/else]
[/if]
-Dan StrongNew World Creative LLChttp://www.NewWorldCreative.com
On 5/3/2013 2:17 AM, Psi Prime Inc, Matthew A Perosi wrote:
Actually I'm not too sure of this. In my experience, when [redirect] is found in a script it will trigger a redirect on the client side without sending anything else down to the browser.
I've not tested this behavior in 6.x or 7.x, but in years past I always had to manually set the cookie values as variables at the same time they are being set in the browser. In subsequent refreshes (without the use of a redirect) the cookie information would be available with [getcookie].
Remember, that cookie information is sent back to the server during the initial request for the next page. They get set as part of the header information during a 200 response as the next page is being loaded. This is why you can't use [setcookie] at the beginning of your script and then expect [getcookie] to return results later in the same script.
-Matt
On 5/2/2013 10:42 PM, Dan Strong wrote:
I'm pretty sure that as long as you set the cookie before the redirect then the cookie will stick.
-Dan StrongNew World Creative LLChttp://www.NewWorldCreative.com
On 5/2/2013 7:39 PM, Steve Graham wrote:
Hello I have a quesion, can i setcookie then redirect to another page? Will the cookie save in the browser or will redirect make the cookie not save? Are there other conditions to make cookie not save?
--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us
--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us
-- Matthew A PerosiCorporate ConsultantMobile Marketing ExpertSenior Web DeveloperSEO Analyst & Educatormatt@psiprime.comPsi Prime, Inc.323 Union Blvd.Totowa, NJ 07512Direct: 888.872.0274Fax: 888.488.5924http://www.perosi.com
--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us
--------------030305010904040707090107--
Associated Messages, from the most recent to the oldest:
This is a multi-part message in MIME format.--------------030305010904040707090107Content-Type: text/plain; charset=ISO-8859-1; format=flowedContent-Transfer-Encoding: 7bitWebDNA 6.2 / CentOS 5.9 / Apache 2.2.3This code works for me (always has):index.html--------------------[setcookie name=loginCookie&value=0000000000&expires=[date %A, %d-%b-%Y][time %X]GMT][redirect new-page.html]new-page.html----------------------[if [GETCOOKIE name=loginCookie]^0000000000][then]it works[/then][else]it doesn't work[/else][/if]-Dan StrongNew World Creative LLChttp://www.NewWorldCreative.comOn 5/3/2013 2:17 AM, Psi Prime Inc, Matthew A Perosi wrote:> Actually I'm not too sure of this. In my experience, when
[redirect] > is found in a script it will trigger a redirect on the client side > without sending anything else down to the browser.>> I've not tested this behavior in 6.x or 7.x, but in years past I > always had to manually set the cookie values as variables at the same > time they are being set in the browser. In subsequent refreshes > (without the use of a redirect) the cookie information would be > available with [getcookie].>> Remember, that cookie information is sent back to the server during > the initial request for the next page. They get set as part of the > header information during a 200 response as the next page is being > loaded. This is why you can't use [setcookie] at the beginning of your > script and then expect [getcookie] to return results later in the same > script.>> -Matt>>> On 5/2/2013 10:42 PM, Dan Strong wrote:>> I'm pretty sure that as long as you set the cookie before the >> redirect then the cookie will stick.>> -Dan Strong>> New World Creative LLC>> http://www.NewWorldCreative.com>> On 5/2/2013 7:39 PM, Steve Graham wrote:>>> Hello I have a quesion, can i setcookie then redirect to another >>> page? Will the cookie save in the browser or will redirect make the >>> cookie not save? Are there other conditions to make cookie not save?>>> --------------------------------------------------------- This >>> message is sent to you because you are subscribed to the mailing >>> list . To unsubscribe, E-mail to: archives: >>> http://mail.webdna.us/list/talk@webdna.us Bug Reporting: >>> support@webdna.us >>>> --------------------------------------------------------- This >> message is sent to you because you are subscribed to the mailing list >> . To unsubscribe, E-mail to: archives: >> http://mail.webdna.us/list/talk@webdna.us Bug Reporting: >> support@webdna.us>> -- >> Matthew A Perosi>> Corporate Consultant>> Mobile Marketing Expert>> Senior Web Developer>> SEO Analyst & Educator>> matt@psiprime.com>>>> Psi Prime, Inc.>> 323 Union Blvd.>> Totowa, NJ 07512>>>> Direct: 888.872.0274>> Fax: 888.488.5924>>>> http://www.perosi.com> --------------------------------------------------------- This message > is sent to you because you are subscribed to the mailing list . To > unsubscribe, E-mail to: archives: > http://mail.webdna.us/list/talk@webdna.us Bug Reporting: > support@webdna.us --------------030305010904040707090107Content-Type: text/html; charset=ISO-8859-1Content-Transfer-Encoding: 7bit
WebDNA 6.2 / CentOS 5.9 / Apache 2.2.3
This code works for me (always has):
index.html
--------------------
[setcookie name=loginCookie&value=0000000000&expires=[date %A, %d-%b-%Y][time %X]GMT]
[redirect new-page.html]
new-page.html
----------------------
[if [GETCOOKIE name=loginCookie]^0000000000]
[then]it works[/then]
[else]it doesn't work[/else]
[/if]
-Dan StrongNew World Creative LLChttp://www.NewWorldCreative.com
On 5/3/2013 2:17 AM, Psi Prime Inc, Matthew A Perosi wrote:
Actually I'm not too sure of this. In my experience, when [redirect] is found in a script it will trigger a redirect on the client side without sending anything else down to the browser.
I've not tested this behavior in 6.x or 7.x, but in years past I always had to manually set the cookie values as variables at the same time they are being set in the browser. In subsequent refreshes (without the use of a redirect) the cookie information would be available with [getcookie].
Remember, that cookie information is sent back to the server during the initial request for the next page. They get set as part of the header information during a 200 response as the next page is being loaded. This is why you can't use [setcookie] at the beginning of your script and then expect [getcookie] to return results later in the same script.
-Matt
On 5/2/2013 10:42 PM, Dan Strong wrote:
I'm pretty sure that as long as you set the cookie before the redirect then the cookie will stick.
-Dan StrongNew World Creative LLChttp://www.NewWorldCreative.com
On 5/2/2013 7:39 PM, Steve Graham wrote:
Hello I have a quesion, can i setcookie then redirect to another page? Will the cookie save in the browser or will redirect make the cookie not save? Are there other conditions to make cookie not save?
--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us
--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us
-- Matthew A PerosiCorporate ConsultantMobile Marketing ExpertSenior Web DeveloperSEO Analyst & Educatormatt@psiprime.comPsi Prime, Inc.323 Union Blvd.Totowa, NJ 07512Direct: 888.872.0274Fax: 888.488.5924http://www.perosi.com
--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us
--------------030305010904040707090107--
Dan Strong
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
One more time (1997)
Bug? (1997)
HTTP "host" header (2003)
[ReturnRaw] and PDFs (2005)
Help! WebCat2 bug (1997)
multiple search commands (1997)
Searchable WebCat (etc.) Docs ? (1997)
WebCatalog-3.0800 on Mac OS X Server (2000)
Date problems-more (1997)
[WebDNA] SEARCH question (2011)
Creating folders and deleting files (1997)
Protect vs Authenicate (1997)
Return records from another (1997)
TRAINING videos - Prove IT. (1998)
Color (2000)
using showpage and showcart commands (1996)
Bookmarked URL with cart (1998)
ALL CAPS converted to All Caps - first letter capitalizedonly (2002)
[OT] Display Glitch (2004)
RE: Credit card processing - UK (1997)