Microsoft KB Archive/328498

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

Article ID: 328498

Article Last Modified on 4/21/2006

-

APPLIES TO


 * Microsoft Internet Explorer (Programming) 6 (SP1)
 * Microsoft Internet Explorer (Programming) 6.0

-



This article was previously published under Q328498



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.



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



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



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



Steps to Reproduce the Behavior
  Create the following in an HTML file. Save it as Test.htm: <!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;>   function onDownloadDone(s) { oText.value=s; }



Download Compressed Info to textarea



 Insert any text in a text file in Notepad (or any text editor). Save the text file as Text.txt.</li> 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.</li> 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.</li></ol>

<div class="references_section">