I guess that when IE6 caches a page returned by an HTTP POST in memory, it doesn't record the data payload for the POST. So if you click Back to get to the results page from a previous POST, it either has to retrieve the page from the server, or you get a "Warning: Page has Expired" error message. There doesn't appear to be any HTTP or HTML header parameters that will change this behavior. Fiddling with Cache-Control and Expires doesn't do it.
Netscape6 behaves similarly. Instead of an inline error page, it pops up a dialog with "The page you are trying to view contains POSTDATA that has expired from cache." Choosing OK does a remote refresh, so it appears to at least cache the POST payload so that it can repeat the query.
Changing from a POST to a GET makes this go away, because all the info is in the URL history. This isn't ideal, for two reasons: (a) doesn't support non-Latin-1 characters in the URL, (b) exposes implementation details (parameters) in the URL.
Here's a good discussion of GET vs POST. Use GET for idempotent operations (basically, lookups), and POSTs for the rest (updates). That's an excellent rule of thumb.
11:47:22 AM
|