Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

PRB: Apache Web Server Does Not Load HTC Behaviors


View products that this article applies to.

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.

↑ Back to the top


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.

↑ Back to the top


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.

↑ Back to the top


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

↑ Back to the top


Status

This behavior is by design.

↑ Back to the top


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

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

HTC Reference
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:

↑ Back to the top


Keywords: KB306231, kbprb

↑ Back to the top

Article Info
Article ID : 306231
Revision : 4
Created on : 5/12/2007
Published on : 5/12/2007
Exists online : False
Views : 465