Re: Help Please WebDNA 6 Secure Forms Problem

This WebDNA talk-list message is from

2004


It keeps the original formatting.
numero = 57917
interpreted = N
texte = Colin Sidwell wrote: I have to assume that you are talking about users pressing the Back button and not being able to see the prior page. If not, please describe exactly the sequence of events (better yet, put a test page on a public site and post the URL). In any case: Version 6.x > Server: Apache/2.0.49 (Unix) DAV/2 PHP/4.3.6 mod_ssl/2.0.49 OpenSSL/0.9.6i Version 5.x > Server: Apache/2.0.47 (iTools 7/Mac OS X) DAV/2 PHP/4.3.2 mod_ssl/2.0.47 OpenSSL/0.9.6i You are running under different operating systems, Apache, and WebDNA, so it is not going to be obvious which is doing what. > If we change the form to a plain .htm document (not parsed by WebDNA) the > form works on version 6 and there are no Cache-control or Pragma values in > the header. That is because .htm pages are static and pages processed by WebDNA are generated. In general (and for good reason), dynamically generated pages should _never_ be cached. You can override that, but only by setting the /proper/ HTTP headers. The correct way to handle this is to set the Date, Last-modified, and Expires headers. The Cache-control and Pragma values are suggestions only; even if you got them set correctly some proxy servers will ignore them (like AOL's). I've included my solution after my signature. You may have to adjust the paths for your setup (I keep global includes in ^Includes so I can access them from any site). Put the following in your common header include file: [include file=^Includes/MIMEHeaders.inc&expires=60] to have the page expire in 60 minutes (for example). You'll also need to adjust the GMT offset as specified in the GMTDate.inc file. HTH John -- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4501 Forbes Boulevard Suite H Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5748 ============cut here ================ [!] ------- MIMEHeaders.inc ------- [/!][if "[expires]"="[raw][expires][/raw]"][!] ---- Check for input variable [/!][then][!] [/!][math show=f]expires=0[/math][/then][!] [/!][/if][!] [/!][SETMIMEHEADER name=Date&value=[include file=^Includes/GMTdate.inc]] [SETMIMEHEADER name=Last-modified&value=[include file=^Includes/GMTdate.inc]] [SETMIMEHEADER name=Expires&value=[include file=^Includes/GMTdate.inc&offset=[expires]]] ============cut here ================ [!] ------- GMTdate.inc ------- Takes optional parameter offset in minutes and returns current date/time in GMT long format Replace the {5:00:00} with your non-DST offset from GMT [/!][math time&show=f]GMT={[date %X]}+{5:00:00}[showif [date format=%Z]^Daylight]-{1:00:00}[/showif][/math][!] [/!][math time&show=f]NOW={[date %X]}[/math][!] [/!][if "[offset]"="[raw][offset][/raw]"][!] [/!][then][!] [/!][math show=f]offsettime=0[/math][/then][!] [/!][else][!] [/!][math show=f]offsettime=[offset]*60[/math][/else][!] [/!][/if][!] --- Create the GMTexpires variable [/!][math time&show=f]GMTexpires=[GMT]+[offsettime][/math][!] --- Create the MIMEexpires string [/!][text show=t]MIMEexpires=[!] [/!][if ([GMT]>[NOW]) and ([GMTexpires]>[GMT]) and ([GMTexpires]<86400)][!] ---- all in the same day ---- [/!][then][!] [/!][date format=%a, %d %b %Y][!] [/!][/then][!] ---- at least one day later ---- [/!][else][!] [/!][format days_to_date %a, %d %b %Y][math]{[date]}+{00/[!] [/!][showif [GMTexpires]>86400][math]floor([GMTexpires]/86400)[/math][/showif][!] [/!][showif [GMTexpires]<86401]01[/showif][!] [/!]/0000}[/math][/format][!] [/!][/else][!] [/!][/if][!] [/!] [Format Seconds_To_Time][GMTexpires][/Format][!] [/!] GMT[/text] ============cut here ================ ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Help Please WebDNA 6 Secure Forms Problem ( Kenneth Grome 2004)
  2. Re: Help Please WebDNA 6 Secure Forms Problem ( "Scott Anderson" 2004)
  3. Re: Help Please WebDNA 6 Secure Forms Problem ( Stuart Tremain 2004)
  4. Re: Help Please WebDNA 6 Secure Forms Problem ( Rob Marquardt 2004)
  5. Re: Help Please WebDNA 6 Secure Forms Problem ( Colin Sidwell 2004)
  6. Re: Help Please WebDNA 6 Secure Forms Problem ( Colin Sidwell 2004)
  7. Re: Help Please WebDNA 6 Secure Forms Problem ( "Scott Anderson" 2004)
  8. Re: Help Please WebDNA 6 Secure Forms Problem ( Colin Sidwell 2004)
  9. Re: Help Please WebDNA 6 Secure Forms Problem ( John Peacock 2004)
  10. Re: Help Please WebDNA 6 Secure Forms Problem ( Colin Sidwell 2004)
  11. Re: Help Please WebDNA 6 Secure Forms Problem ( Donovan Brooke 2004)
  12. Re: Help Please WebDNA 6 Secure Forms Problem ( Donovan Brooke 2004)
  13. Re: Help Please WebDNA 6 Secure Forms Problem ( John Peacock 2004)
  14. Re: Help Please WebDNA 6 Secure Forms Problem ( John Peacock 2004)
  15. Re: Help Please WebDNA 6 Secure Forms Problem ( Colin Sidwell 2004)
  16. Re: Help Please WebDNA 6 Secure Forms Problem ( Donovan Brooke 2004)
  17. Re: Help Please WebDNA 6 Secure Forms Problem ( Rob Marquardt 2004)
  18. Re: Help Please WebDNA 6 Secure Forms Problem ( Colin Sidwell 2004)
  19. Re: Help Please WebDNA 6 Secure Forms Problem ( John Peacock 2004)
  20. Help Please WebDNA 6 Secure Forms Problem ( Colin Sidwell 2004)
Colin Sidwell wrote: I have to assume that you are talking about users pressing the Back button and not being able to see the prior page. If not, please describe exactly the sequence of events (better yet, put a test page on a public site and post the URL). In any case: Version 6.x > Server: Apache/2.0.49 (Unix) DAV/2 PHP/4.3.6 mod_ssl/2.0.49 OpenSSL/0.9.6i Version 5.x > Server: Apache/2.0.47 (iTools 7/Mac OS X) DAV/2 PHP/4.3.2 mod_ssl/2.0.47 OpenSSL/0.9.6i You are running under different operating systems, Apache, and WebDNA, so it is not going to be obvious which is doing what. > If we change the form to a plain .htm document (not parsed by WebDNA) the > form works on version 6 and there are no Cache-control or Pragma values in > the header. That is because .htm pages are static and pages processed by WebDNA are generated. In general (and for good reason), dynamically generated pages should _never_ be cached. You can override that, but only by setting the /proper/ HTTP headers. The correct way to handle this is to set the Date, Last-modified, and Expires headers. The Cache-control and Pragma values are suggestions only; even if you got them set correctly some proxy servers will ignore them (like AOL's). I've included my solution after my signature. You may have to adjust the paths for your setup (I keep global includes in ^Includes so I can access them from any site). Put the following in your common header include file: [include file=^Includes/MIMEHeaders.inc&expires=60] to have the page expire in 60 minutes (for example). You'll also need to adjust the GMT offset as specified in the GMTDate.inc file. HTH John -- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4501 Forbes Boulevard Suite H Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5748 ============cut here ================ [!] ------- MIMEHeaders.inc ------- [/!][if "[expires]"="[raw][expires][/raw]"][!] ---- Check for input variable [/!][then][!] [/!][math show=f]expires=0[/math][/then][!] [/!][/if][!] [/!][SETMIMEHEADER name=Date&value=[include file=^Includes/GMTdate.inc]] [SETMIMEHEADER name=Last-modified&value=[include file=^Includes/GMTdate.inc]] [SETMIMEHEADER name=Expires&value=[include file=^Includes/GMTdate.inc&offset=[expires]]] ============cut here ================ [!] ------- GMTdate.inc ------- Takes optional parameter offset in minutes and returns current date/time in GMT long format Replace the {5:00:00} with your non-DST offset from GMT [/!][math time&show=f]GMT={[date %X]}+{5:00:00}[showif [date format=%Z]^Daylight]-{1:00:00}[/showif][/math][!] [/!][math time&show=f]NOW={[date %X]}[/math][!] [/!][if "[offset]"="[raw][offset][/raw]"][!] [/!][then][!] [/!][math show=f]offsettime=0[/math][/then][!] [/!][else][!] [/!][math show=f]offsettime=[offset]*60[/math][/else][!] [/!][/if][!] --- Create the GMTexpires variable [/!][math time&show=f]GMTexpires=[GMT]+[offsettime][/math][!] --- Create the MIMEexpires string [/!][text show=t]MIMEexpires=[!] [/!][if ([GMT]>[NOW]) and ([GMTexpires]>[GMT]) and ([GMTexpires]<86400)][!] ---- all in the same day ---- [/!][then][!] [/!][date format=%a, %d %b %Y][!] [/!][/then][!] ---- at least one day later ---- [/!][else][!] [/!][format days_to_date %a, %d %b %Y][math]{[date]}+{00/[!] [/!][showif [GMTexpires]>86400][math]floor([GMTexpires]/86400)[/math][/showif][!] [/!][showif [GMTexpires]<86401]01[/showif][!] [/!]/0000}[/math][/format][!] [/!][/else][!] [/!][/if][!] [/!] [Format Seconds_To_Time][GMTexpires][/Format][!] [/!] GMT[/text] ============cut here ================ ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ John Peacock

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:

Re:Review comparison by PC Magazine: Open for On-line Business (1997) charging? (2001) Emailer (1997) listfiles with large volume of files (2004) wrong input values? (1997) UPS QuickCost and More (2000) Searching Numbers (2004) Sorting Various Sizes (2003) Searching multiple fields (1997) WebCat2b12plugin - [search] is broken ... not! (1997) Incorrect Value Display (2000) can WC render sites out? (1997) access denied problem (1997) Using a database with a short url (2000) WebCat2b13MacPlugIn - [showif][search][/showif] (1997) Re[3]: 2nd WebCatalog2 Feature Request (1996) PSC recommends what date format yr 2000??? (1997) stumped on simple sort (1999) two domains and one cart and database (2000) New syntax feedback for 4.0 (2000)