Recover Lost Form Submissions
Getting back to forms that throw errors when you submit them, I have a few tips to help you try and recover the lost data.
Let's say you fill in a form and submit it only for the server to return an error. There can be any number of reasons, but we'll assume it timed-out. Your first reaction might be to hit the back button and try again, only to find that all the fields on the form are now empty. Even that really long entry you typed in the "rich text" box! Well, don't despair, we can probably recover it all without having to re-type that novella all over again.
Depending on the type of error you see, it's often worth just hitting the refresh button before you get as far as using the back button. You'll see a message like below that warns you that the form contains data or something to that effect. Say ok and let the form re-submit. Hopefully you'll have better luck this time.
If the error was generated by the server and is a page telling you to correct some fields, you have no choice but to press the back button and hope the field values are retained (I am still to work out why/how/when browser decide to retain values and when not to). Let's say they've been lost. Again, don't panic. All you need is a sniffer that lets you view the data exchanged between browser and server. I prefer this one, but it ain't cheap, so you might want to try Ethereal.
Start your sniffer app and make sure it's sniffing your connection. Now, press the forward button. This will probably show you a cached copy of the page with the same error on it. Now refresh that page. You'll see the same error generated by the server. Notice also that your sniffer app has logged the traffic from the retry, including all the field values. Sift through this log to find that the big fields and copy them back in. Bob's me dad.
I know it's not a perfect solution but it's saved me time in the past. Just remember not to panic next time it happens to you and have your sniffer at the ready.
I'm pretty sure the reason why your browser forgets is because of the cache settings via the meta-tags (and/or) the ones set via HTTP commands. I'm sure I did a test a while back (whilst checking a form I did {Link})
and so came to that conclusion. I ended up creating session variables, so users could go back & forth however they please without losing data. Oh and the post code lookup only works for the area of Shropshire, as we don't have anything else, or luckily require it.
Oh and excuse the design, its a few years old – and luckily not one I did.
Live HTTP Headers is a very nice sniffer plugin for Mozilla Firefox.
{Link}
Does LiveHeaders show the data sent as part of a POST request or just the headers Henk?
It shows the data of the POST request as well as the headers Jake.
You should also take a look at the Web Developer plugin
{Link}
It offers tools for outlining block level elements, speed report, HTML and CSS validation and a lot more. Very handy for a web developer such as yourself
proxomitron's HTTP Message Log window enables viewing posted data. Its a proxy and its free.