BUG: The discard attribute may cause the cookie to be lost in Internet Explorer for Macintosh (827829)



The information in this article applies to:

  • Microsoft Internet Explorer 5.2.x for Macintosh

SYMPTOMS

If the server sends a cookie to the Microsoft Internet Explorer client and the discard attribute is sent at the end of the Set-Cookie header, the client will not save the cookie.

RESOLUTION

Do not to set the discard attribute at the end of the Set-Cookie header.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section of this article.

MORE INFORMATION

Steps to reproduce the behavior

  1. Create a page with the following code, name it Test.asp, and then put it in a virtual directory that is inside a server that is running Microsoft Internet Information Services (IIS):
    <% Response.AddHeader "Set-Cookie", "cookie1=oreo; domain=.microsoft.com; discard" 
    Response.AddHeader "Set-Cookie", "cookie2=vanilla wafers; discard; domain=.microsoft.com" %> 
    
    <html> 
    <body>
    <% Response.Write Time %><br> <br> 
    cookie1=<% Response.Write Request.Cookies("cookie1")%><br> 
    cookie2=<% Response.Write Request.Cookies("cookie2")%><br> <br>
    <form method="POST" action="repro.asp"> 
    <input type="submit"> 
    </form>
    </body>
    </html> 
    
  2. Navigate to the page by using Internet Explorer for Macintosh.
  3. Click Submit, and then wait until the page refreshes.
Notice that the first cookie is not displayed. Only the second cookie is displayed. You cannot reproduce the behavior by using Microsoft Internet Explorer 6.0 for Windows.

Modification Type:MajorLast Reviewed:1/27/2004
Keywords:kbpending kbbug KB827829 kbAudDeveloper