BUG: Internet Explorer Does Not Detect Content Type Change from Text/html to Text/xml (264868)



The information in this article applies to:

  • Microsoft Internet Explorer (Programming) 6.0
  • Microsoft Internet Explorer (Programming) 5.5
  • Microsoft Internet Explorer (Programming) 5
  • Microsoft Internet Explorer (Programming) 5.01

This article was previously published under Q264868

SYMPTOMS

If the ContentType property of a URL changes from "text/html" (which is the default for Active Server Pages) to "text/xml" or vice-versa, but the URL stays the same, Internet Explorer displays the new contents of the page with the old content type. You must open a new instance of Internet Explorer to see the information displayed correctly with the new content type.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Steps to Reproduce Behavior

Note: These steps assume that you are familiar with Internet Information Server (IIS) and Active Server Pages (ASP).
  1. Create a new ASP page with the following code:
    <%@ Language="VBScript" Codepage="65001" %>
    
    <% 	Response.ContentType = "text/xml" %>
    
    <XMLSTUFF>
    This is some stuff
    </XMLSTUFF>
    					
  2. Save this ASP file as ContentType.asp to the default Web site of your IIS Server.
  3. Start a new instance of Internet Explorer, and browse to the newly created ASP page (for example, http://<Your_IIS_Server>/ContentType.asp). Notice that the content appears as XML.
  4. Do not close the browser window, and open the ASP page. Comment out the ContentType line as follows:
    'Response.ContentType = "text/xml"'
    						
    and save the ASP page again.
  5. Refresh the browser window. Notice that the content still appears as XML, even though the content type has changed.
  6. Open a new instance of Internet Explorer, and browse to the ASP page. Notice that the content appears with the ASP default content type of "text/html".

Modification Type:MajorLast Reviewed:5/8/2003
Keywords:kbbug kbMSXMLnosweep kbpending KB264868