Article ID: 306231 - Last Review: May 12, 2007 - Revision: 3.1

PRB: Apache Web Server Does Not Load HTC Behaviors

This article was previously published under Q306231
The third-party products that are discussed in this article are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, regarding the performance or reliability of these products.
Expand all | Collapse all

SYMPTOMS

When you use the Apache Web server to host a Web page that is linked to Hypertext Markup Language (HTML) components (.htc files), the HTC behaviors do not work in Internet Explorer.

CAUSE

The Apache Web server does not have the correct Multipurpose Internet Mail Extension (MIME) information for the .htc files. The Apache Web server returns the .htc MIME type as:
www/unknown
In Internet Explorer 4.0 and later, MIME-type determination occurs in the Uniform Resource Locator (URL) monikers through the FindMimeFromData method. If the server-provided MIME type is unknown, FindMimeFromData immediately returns this MIME type as the final determination, and does not locate the proper process to handle the .htc files.

Note: The correct MIME type of the .htc file is Text/x-component.

RESOLUTION

You can resolve the problem on the Apache Web server side if you add the correct MIME type for the HTC behavior with the following command:

AddType text/x-component .htc

If the command AddType is not found or is not available, follow these steps to add the MIME type text/x-component for the .htc file manually to the Apache Web server.
  1. Locate the directory /Etc/apache/.
  2. Open the file Mime.types.
  3. Add the following line to the file: text/x-component htc
  4. Save and close the file.
  5. Restart the Apache Web server. The Mime.types file is reloaded after you type: /usr/apache/bin/apachectl restart

STATUS

This behavior is by design.

REFERENCES

For more information, visit the following Microsoft Web sites:

Appendix A: MIME Type Detection in Internet Explorer
http://msdn2.microsoft.com/en-us/library/ms775147.aspx (http://msdn2.microsoft.com/en-us/library/ms775147.aspx)

Support WebCast: MIME Type Handling in Microsoft Internet Explorer
http://support.microsoft.com/kb/325241 (http://support.microsoft.com/kb/325241)

HTC Reference
http://msdn2.microsoft.com/en-us/library/ms531018.aspx (http://msdn2.microsoft.com/en-us/library/ms531018.aspx)
For information about how to add a MIME Type to the Apache Web server, visit the following Apache Web sites:
Apache Server Frequently Asked Questions
http://httpd.apache.org/docs/misc/FAQ.html (http://httpd.apache.org/docs/misc/FAQ.html)

AddType directive
http://httpd.apache.org/docs/mod/mod_mime.html#addtype (http://httpd.apache.org/docs/mod/mod_mime.html#addtype)

APPLIES TO
  • Microsoft Internet Explorer 5.5
  • Microsoft Internet Explorer (Programming) 6 (SP1)
Keywords: 
kbprb KB306231
Retired KB ArticleRetired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
 

Article Translations

 

Related Support Centers