stale session with FORM and its kin

18 views
Skip to first unread message

Dave S

unread,
Jan 15, 2024, 5:07:41 AMJan 15
to web2py-users
Somewhere along the way, and that probably includes the manual, Massimo has noted that the use of the family of FORM helpers is generally used to get parameters for an action whose results are then displayed on another page as a redirect.  "What picture do you want to look at?  Okay, let's go to that picture...".

I do that with some of my forms, but in others, I just let the action happen and return the form for the next set of parameters.  "what do you want to change the tag to?  Okay, done,  Change another tag?"

When I do that, and then let the session expire before I get around to changing another tag (having youtube going on the other computer can do that to you), the major browsers will say something like "Confirm Form Resubmission".  That's sort of acceptable if it's just an app for me, myself, and I, but if I have actual users I will have confused users.

I know which ones I can resubmit safely, and which ones chopping the '#' off the end of the URL is a good way forward, but that isn't something I should be telling users to do.

I have one of the repetitive forms as a LOAD block in a page, and doing that hides the expiration issue, but it seems hokey to do that for all such forms.  However, about the only other idea I've come up with is to use a timer to cause a "redirect" to self, thus doing a fresh GET of the form.

Has anyone else come up with a better than either of those choices?

Thanks for your thoughts.

Dave 
/dps

Reply all
Reply to author
Forward
0 new messages