Re: instant cookies?

This WebDNA talk-list message is from

1999


It keeps the original formatting.
numero = 23174
interpreted = N
texte = >I use cookies for the first time and ran into a problem: >I want to set a cookie and read it immediately, to find out if the browser >accepts cookies. If I can read the fresh cookie, I continue. In the other >case I redirect to a different page. >Now it happens, that I can't set and read a cookie on the same page - I >need a second call. I tried to redirect to the same page after I set the >cookie, to no avail. Just a manual reload displays the new value. >Any hints?You can't set and read a cookie on the same page.You'll have to set the cookie on your entry page, and then on your following pages check for the cookie, and if it's not set - redirect your visitor to you no-cookie-page. ************************************************************* Christer Olsson Stora Nygatan 21 Phone +46 40 791 50 Ljusa Ideer AB S-211 37 Malmoe Fax +46 40 97 99 77 Sweden http://www.ljusaideer.se Associated Messages, from the most recent to the oldest:

    
  1. Re: instant cookies? (Peter Ostry 1999)
  2. Re: instant cookies? (Brian B. Burton 1999)
  3. Re: instant cookies? (Christer Olsson 1999)
  4. Re: instant cookies? (Peter Ostry 1999)
  5. Re: instant cookies? (PCS Technical Support 1999)
  6. Re: instant cookies? (PCS Technical Support 1999)
  7. Re: instant cookies? (Christer Olsson 1999)
  8. instant cookies? (Peter Ostry 1999)
>I use cookies for the first time and ran into a problem: >I want to set a cookie and read it immediately, to find out if the browser >accepts cookies. If I can read the fresh cookie, I continue. In the other >case I redirect to a different page. >Now it happens, that I can't set and read a cookie on the same page - I >need a second call. I tried to redirect to the same page after I set the >cookie, to no avail. Just a manual reload displays the new value. >Any hints?You can't set and read a cookie on the same page.You'll have to set the cookie on your entry page, and then on your following pages check for the cookie, and if it's not set - redirect your visitor to you no-cookie-page. ************************************************************* Christer Olsson Stora Nygatan 21 Phone +46 40 791 50 Ljusa Ideer AB S-211 37 Malmoe Fax +46 40 97 99 77 Sweden http://www.ljusaideer.se Christer Olsson

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:

Server Jumping and Web-networking (2000) Trigger date/month/year setting question (2002) Hide Ifs (2000) Sku numbers (1997) using listfiles to build a database? more (2000) Upgrading from version (1998) [ShowNext] feature in 2.0 (1997) IASPI_Rewrite & WebDNA (2007) The word TYPE in search contexts and fields (1998) normal users.db calls ... (1998) [WebDNA] Test (2014) SIMS setup (1998) Custom WebCat Prefs ... (1997) shownext problems (1998) Outsourcing partnership ... (2005) Commas in search (1998) Draft Manual, Tutorial, and more (1997) Remove WebDNA context (2001) WC2b12: Yes, Formulas.db is for real (1997) [WebDNA] Storing time data in a database (2016)