title: Can you reliably set or delete a cookie during the server side processing of an Ajax (XHR) call?
body: <p>I have done a bit of testing on this myself (During the server side processing of a DWR Framework Ajax request handler to be exact) and it seems you CAN successfully manipulate cookies, but this goes against much that I have read on Ajax best practices and how browsers interpret the response from an XmlHttpRequest.  Note I have tested on:</p>
  
  <ul>
  <li>IE 6 and 7</li>
  <li>Firefox 2 and 3</li>
  <li>Safari</li>
  </ul>
  
  <p>and in all cases standard cookie operations on the HttpServletResponse object during Ajax request handling were correctly interpreted by the browser, but I would like to know if it best practice to push the cookie manipulation to the client side, or if this (much cleaner) server side cookie handling can be trusted.</p>
  
  <p>I would welcome answers both specific to the DWR Framework and Ajax in general.</p>