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.

BUG: When You Use Behaviors with Compressed Data in Internet Explorer, the Data May Not Decompress


View products that this article applies to.

This article was previously published under Q328498

↑ Back to the top


Symptoms

When you use behaviors to download information from a file to an HTML document, and static compression is enabled in Internet Information Services (IIS), the data that is downloaded to the HTML document does not always appear. Typically, the document loads as expected on the first try. However, dynamic data may not appear when you try to download it again.

↑ Back to the top


Cause

This problem occurs because Internet Explorer always reads compressed data as being cached, even if the cache-control setting specifies a different value.

↑ Back to the top


Resolution

If you must have dynamic HTML (DHTML) functionality, turn off compression on IIS for maximum compatibility.

↑ Back to the top


Status

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

↑ Back to the top


More information

Steps to Reproduce the Behavior

1.Create the following in an HTML file. Save it as Test.htm:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML XMLNS:IE>
<head>
<script language="JavaScript">
function onDownloadDone(s) {
	oText.value=s;
}
</script>
</head>

<body>
<IE:DOWNLOAD ID="oDownload" STYLE="behavior:url(#default#download)" />

<p><a href="javascript:oDownload.startDownload('Text.txt', onDownloadDone)">Download Compressed Info to textarea</a>
</p>

<p>
<textarea id="oText" cols="65" rows="10"> </textarea>
</p>

</body>
</html>
2. Insert any text in a text file in Notepad (or any text editor). Save the text file as Text.txt.
3.Put both the HTML file and the text file in the same IIS virtual directory (do not turn on compression). Start Internet Explorer, and then view the HTML file. Click the button. The text that you saved in the Text.txt file appears in the text area as expected.
4.Turn on compression in IIS, and then reload the HTML file. The first time that you click the button, the text appears in the text area. When you click the button again (and on every later try), the text area is blank.

↑ Back to the top


References

For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
255801 How to Determine if HTTP Compression Is in Use
For more information about developing Web-based solutions for Microsoft Internet Explorer, visit the following Microsoft Web sites:

↑ Back to the top


Keywords: KB328498, kbbug, kbpending

↑ Back to the top

Article Info
Article ID : 328498
Revision : 4
Created on : 4/21/2006
Published on : 4/21/2006
Exists online : False
Views : 414