Updated: 3/18/2003; 11:31:19 AM.
Jason May's Weblog
        

Wednesday, April 17, 2002

This appears to be a good summary of software architecture options.  I like his use of the term "styles".


7:27:02 PM    

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    

© Copyright 2003 Jason May.
 
April 2002
Sun Mon Tue Wed Thu Fri Sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30        
Mar   May


Click here to visit the Radio UserLand website.

Subscribe to "Jason May's Weblog" in Radio UserLand.

Click to see the XML version of this web page.

Click here to send an email to the editor of this weblog.