[Catalyst] Re: REST - like uri design for CRUD

Aristotle Pagaltzis pagaltzis at gmx.de
Mon Jan 28 10:27:35 GMT 2008


* Len Jaffe <lenjaffe at jaffesystems.com> [2008-01-28 03:10]:
> Are FF & IE smart enough to not re-POST if I send the results
> with A 201 instead of redirecting to a GET?

I don’t even know what they do with a 201, to be honest. (I know
they treat 204 as “stay on this page,” just as they should.)

I never looked because it doesn’t matter. IIS used to send flat
wrong Content-Location header values (don’t know if this has been
fixed in recent versions), so no browser can afford to respect
that header (thanks, MSFT!). Absent that header, though, 201 does
not anything practical over a redirect. Maybe less, if browsers
don’t treat it as one – as I said, I never bothered to find out.

It’s nice when writing an Ajax interface to your app, though, or
other programmatic clients. Basically the server tells the client
“I know the next thing you’d do is follow a redirect, so pretend
that you already made that request and I am responding to that.”
Saves a roundtrip.

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>



More information about the Catalyst mailing list