Microsoft KB Archive/328498

From BetaArchive Wiki

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.

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.


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:

Keywords: kbpending kbbug KB328498