I'm going to assume from what you have described that you're passing your parameters through QUERY_STRING or PATH_INFO, and the browser is using an HTTP GET on the CGI script.
If you're modifying anything based on the result of a request, you should not use GET, you should use an HTML form, with a POST method.
Modern web browsers will NOT resend the data if the user clicks refresh from a POST. Of course, many will refuse to send anything at all, so you'll want to follow the HTTP recommendation, and send a 201 status and a Location header to point them to the stable URI for the item. (ie, a read-only URI).
Update: as Ieronim correctly points out -- almost all browsers will send it, but they should prompt first. (I should have said 'will not resend the data without warning', but that's of little condolence, as most users won't understand the implications.) A few browsers also haven't followed the recommendation under History List, and will ask you to resend the POST if you wish to go 'back' in your browser history.
To deal with both of these issues, I'll repeat myself, and suggest the combination of 201 w/ a Location header to a stable URI for the created/modified record.
In reply to Re: CGI and Sessions
by jhourcle
in thread CGI and Sessions
by santhi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |