Blog | Admin | Archives | Random | Recent | Thanks

Where Does It Go?

The usual experience when submitting forms and recieving errors, is that one can click “Back” (or, as I most often do, hit my backspace key), and the just-submitted form will still have the info you just submitted entered in, so all you have to do is change the offending field, and resubmit. Take, for example, my comment spam protection idea – now implemented by several people. If a real human forgets to check the “I am human” checkbox, they see a rather blank looking page with the text “Error: You are inhuman scum!”

“How dare you insult me, Arcanius!” They wonder aloud, as they click back (or if they are cool, like me, they use their backspace key), to figure out why I am insulting them. But then – gasp – the 15 page comment they meticulously crafted in the small textarea box is gone – apparently forever.

I have lost more than one comment this way to wordpress. The question is, where does it go? Its not just a Firefox thing – IE looses the comment too. I suspect that it is related to the die() command, but I have no idea why. Or perhaps someone more skilled than I am in the behavior of WordPress, or Web Forms, or something or another, can inform me as to what is really going on here.

2 Responses to “Where Does It Go?”

  1. Checksum Arcanius » Uncaching Says:

    […] ching
    Filed under: Everything SilverFir — Ryan McElroy @ 01:02 am

    An earlier question and Bernie’s response led me to snoop around the WordPress source code, where I f […]

  2. Bernie Zimmermann Says:

    I don’t think it has anything to do with the die() function you’re calling.

    When I hit the back button, I can tell that Firefox is reloading the page. Typically what will happen is the page will be cached (along with your form input) and reappear very quickly. In your case, I’m guessing WordPress has something in its code somewhere so that it doesn’t get cached. There’s more information on this over at PHP’s site (maybe this might help?).

    Another possibility is that it has something to do with a stored cookie? Maybe it looks for data in the cookie and then repopulates the form with whatever it finds, therefore overriding what’s in the comment box? Seems a little far-fetched, but you never know.

    I’ll be interested in hearing the solution if you figure it out. Good luck!

Leave a Reply