Adam explains something I've been too dense to fully understand until now. "Here's the situation, if you care. (If you do interactive DB sites, you might care.)" I do, and I do.
In fact, the way he recommends doing redirects to avoid "the scary browser warning about reposting form data" is exactly the same way I've been doing the programming for the site I'm developing. The thing is that I didn't put two and two together to realize exactly why it was working the way it was. I mean, I suppose I understood it, but I didn't actually think about it, systematize it, and put it in a pithy formulation like "GET after POST". You da man, Adam.
When I've developed stuff for myself I've tended to just stick everything in one (physical) page if it's not inappropriate (since who cares? it's just for me), and I was careful to not resubmit after getting the scary browser warnings. However, this isn't acceptable for developing public sites, which is what I've been working on. It's even more important when you're dealing with money: "In general you don't want to repost form data, because you'll end up submitting another order for a set of books."
The only thing I'm still wondering is exactly what happens when you hit back in your browser after being redirected. Does the browser refetch the page that redirected you from the server, or does it just pull it from its cache? I suppose that depends on your HTTP caching settings you send to the browser? And can you still use the same technique if you redirect to the current page?
Finally, I share Adam's complaints: "In fact, most books and references on web programming tend to have awful advice when it comes to using GET and POST. Lots of sites use POST for search boxes. This means that you can't bookmark or link to a search." I've always been pissed at Webster's site for this very reason. In fact, I think at least part of the reason everyone uses dictionary.com to link to definitions is because they use GET while m-w.com uses POST. In fact, Webster even allows you to use GET (I found that through my own experimentation), but in their wisdom they use POST for their form.
new⇒Acknowledging the Arrival of Peak Government
In many ways, Peak Oil isresponsible for this newuselessness of the big g...
Revence: May 16, 6:35am