IEMac, POSTed Forms, and Redirects : Certain precautions need to be taken when processing POST method forms when the user has IE for Macintosh.

Interesting bug I tracked down in one of my sites last night.

Due to the nature of form-submitted checkboxes (a value is sent if checked, nothing is sent if it's not) Page B loops through the available values, setting things one way if passed, another way if not.

Occasionally, users were getting their entire friend list cleared. As though the form were submitted with all boxes unchecked.

The problem, I found, is that when I'm on Page C (after a Response.Redirect, and so the URL looks correct, as though I'm on Page C) if I hit Refresh with IE4.5Mac, it actually re-runs Page B. (After guessing what the problem was, I verified it--hitting refresh on "giftlist.asp?nocache=342341" repeatedly changes the random number, which is set at the bottom of Page B.)

Combine this behavior with IEMac's annoying behavior, where refreshing a page which had form values POSTed to it causes the page to be processed with no form values passed (unlike IEWin's dialog that gives you the choice to re-submit your form), and I had a deadly combination--refreshing a seemingly innocent page was actually re-processing my form as though everyone had been unchecked!

The solution is simple--check to make certain that the submit button passed a value before processing the form--but I thought it was an important situation to point out. When dealing with IEMac and form-processing pages, always make certain that the form was really submitted to the page before doing anything drastic based on un-passed data.

penis
6:29pm EST
2004-Nov-21
what does this do
Gavin Kistner
12:59am EST
2006-Mar-31
Sorry, comments have been disabled, because some fuckwad spammer (yes, YOU asshole) has been trying to flood my site with links. I'm tired of deleting them, so until I implement some sort of a captcha or other authentication system, I'm just taking comments offline.

Stupid mean spammer people just suck. A lot.
created 1999-Dec-21page modified 1999-Dec-21