HTTP Status 204
This was new to me. The HTTP Response header can use a status code '204 No Content'. This tells the user-agent not to expect any response content, and so to not refresh the current page. For simple interactions where you want to keep the server current on a users selections it looks useful.
Here's some (old but interesting) browser test results. There's apparently some disagreement on whether response content accompanying a 204 is an error, or should just be ignored. The safe bet seems to be to not send any content body.
1 Comments:
hello, nice entry, http status 204 is very good, I'm just programming shop, with shopping cart, using this one...
When user clicks on image (checkbox) item is added to cart, after that image changes to "checked". After clicking again it changes to "unchecked" and it is thrown from a cart. With no refreshing. very nice...
<< Home