title: Is it valid/predictable to return multiple Cookies with the Same Name (and different domain/path)?
body: <p>Is it valid in HTTP (and does it work reliably) to send multiple cookies with the same name in the same HTTP Set-Cookie response header?</p>
  
  <p>The response would be similar to:</p>
  
  <pre><code>Set-Cookie: NAME=bad;  path=/notthere;     expires=getridofthiscookie
  Set-Cookie: NAME=good; path=/
  Set-Cookie: NAME=bad;  domain=a.subdomain; expires=getridofthisaswell
  </code></pre>
  
  <p>The purpose is to get rid of extraneous cookies ('bad' cookies) created with the wrong path (or on a subdomain) which is leading to less-than-desirable cookie values sent to the server depending on the request path/domain.</p>
  
  <hr>
  
  <p>Related</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/1239079/what-to-do-when-there-are-two-cookies-with-the-same-name-in-ie7/1242446#1242446">What to do when there are two cookies with the same name in IE7?</a></li>
  <li><a href="https://stackoverflow.com/questions/4056306/how-to-handle-multiple-cookies-with-the-same-name?rq=1">How to handle multiple cookies with the same name?</a></li>
  </ul>