PRB: IE3.x Leaks Memory when Submitting Pages Using POST Method

Last reviewed: January 2, 1998
Article ID: Q173145
The information in this article applies to:
  • Microsoft Internet Explorer versions 3.01, 3.02 for Windows NT 4.0
  • Microsoft Active Server Pages, versions 1.0, 1.0b
  • Microsoft Internet Explorer versions 3.01, 3.02 for Windows 95

SYMPTOMS

When working in Internet Explorer 3.x and submitting pages that use the <Form Method=POST> tag, you may notice one of the following on the client machine:

  • Resources are used and not released.
  • The computer slows, becomes sluggish, or may even hang.
  • You receive the message "Out of memory. Please close one or more applications and try again"

These symptoms occur on the client machine, not on the Web server. Shutting down Internet Explorer 3.x frees the memory and causes the computer to run normally.

CAUSE

Microsoft Internet Explorer 3.x caches page information when using the <Form Method=POST> tag and fails to free the memory until the application is shut down.

RESOLUTION

To prevent Internet Explorer 3.x from caching the page information, use Active Server Pages (ASP) to add an HTTP header to the page with the POST method. This is easily accomplished using Active Server Pages by adding the following line to the top of an .asp page:

   <% Response.AddHeader "Pragma", "No-Cache" %>

If the page with the POST method is an HTML page, simply add the ASP code to the page and change the extension to .asp to force the page to be parsed by the Asp.dll, thereby adding the header.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Pages being hosted by Web servers that do not support ASP can use other methods such as Pearl script to add an HTTP header. Consult the Pearl or other language documentation for information on adding HTTP headers.

Steps to Reproduce Behavior

  1. Paste the code below into a page named POST.asp.

  2. Launch any resource monitor to view memory usage. For example, "Task Manager" in Windows NT.

  3. Launch the Post.asp file created in step 1 above in Internet Explorer.

  4. Click Submit multiple times. Result: "Memory Usage History" in the Performance tab of Task Manager does not show an increase in memory usage.

  5. Remove the first line--<% Response.AddHeader "Pragma", "No-Cache" %>-- from the Post.asp file. Save the file.

  6. Refresh the Post.asp page in Internet Explorer.

  7. Press the submit button multiple times.

"Memory Usage History" in the "Performance" tab of "Task Manager" will show an increase in memory usage.

   =======Post.asp begin.  Do not pass this line in Post.asp=============
   <% Response.AddHeader "Pragma", "No-Cache" %>
   <HTML>
   <HEAD><TITLE>Sample adding HTTP header using ASP</TITLE></HEAD>
   <BODY>
   <FORM Name=frmProposals METHOD=POST ACTION="post.asp">
       <INPUT Type=Submit Value="Submit">
   </FORM>
   </BODY>
   </HTML>


Additional query words: leak
Keywords : VIMisc
Technology : kbInetDev
Version : WINDOWS:3.01,3.02; WINDOWS NT:1.0,1.0b
Platform : NT WINDOWS
Issue type : kbprb


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: January 2, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.