title: HTTP status codes : 204 OR 200 with body containing an empty object?
body: <p>I'm having trouble to understand the use cases of the 204 HTTP status code.
  The RFC2616 says : </p>
  
  <blockquote>
    <p>10.2.5 204 No Content</p>
    
    <p>The server has fulfilled the request but does not need to return an
    entity-body, and might want to return updated metainformation. The<br>
    response MAY include new or updated metainformation in the form of<br>
    entity-headers, which if present SHOULD be associated with the<br>
    requested variant.</p>
    
    <p>If the client is a user agent, it SHOULD NOT change its document
    view    from that which caused the request to be sent. This response
    is    primarily intended to allow input for actions to take place
    without    causing a change to the user agent's active document view,
    although    any new or updated metainformation SHOULD be applied to
    the document    currently in the user agent's active view.</p>
    
    <p>The 204 response MUST NOT include a message-body, and thus is
    always    terminated by the first empty line after the header fields.</p>
  </blockquote>
  
  <p>Does the "document view" refers to the DOM ? </p>
  
  <p>If for instance, I fire an AJAX request deleting a user and I update my page to remove the user from a list once my request is successfully completed , should the server give me a 200 with a {} as a response or a 204 without a body ?</p>
  
  <p>Edit : My main concern is related to the "If the client is a user agent, it SHOULD NOT change its document view from that which caused the request to be sent." part. To reformulate it with my own words : Can I update the DOM if I return a 204 ?</p>