FIX: Applets Download Slowly If Host URL Uses IP Address

ID: Q182620


The information in this article applies to:
  • Microsoft Win32 Virtual Machine for Java
  • Microsoft SDK for Java, versions 2.0, 2.01
  • Microsoft Internet Explorer versions 4.0, 4.01 for Windows 95
    on the following platforms: NT, Win95
  • Microsoft Internet Explorer versions 4.0, 4.01 for Windows NT 4.0
    on the following platforms: NT


SYMPTOMS

When Internet Explorer 4.0 or 4.01 loads an applet from a URL that begins with an IP address, for example "http://172.23.21.38/my folder", as opposed to "http://example.microsoft.com", the class files of the applet download very slowly, with a delay of roughly five seconds for each class file. The name of each class file is displayed in the status bar as it downloads.


CAUSE

In this scenario, builds 2252, 2334, and 2339 of the Virtual Machine for Java does a reverse lookup via DNS, using the IP address to get the host name, each time it loads a class file. It queries several sources for the name, receives a timeout for each one, and finally simply uses the IP address without knowing the host name.

The delay for each class is relatively short, but it can add up to several minutes to download a complex applet.


RESOLUTION

The available workarounds include the following:

  • If the Web server has a name, use that in the URL you connect to.


  • Provide a name for the Web server by adding it to a Domain Name Server or to your HOSTS file. That name can even be a string that matches the IP address.


  • Place the applet classes in a CAB file. There will be a short delay downloading the CAB file, but no further delay loading the applet.



STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug has been fixed in the Internet Explorer 4.01 Service Pack 1 and SDK for Java 2.02.


MORE INFORMATION

Steps to Reproduce Behavior

If you have or can connect to a Web page with an applet, and you know both the host name and the IP address of the Web server, you can reproduce this behavior with the following steps:

  1. On a machine with Internet Explorer 4, delete the Temporary Internet files.


  2. Start a new copy of Internet Explorer. If you are using Internet Explorer 4 with Active Desktop, you will need to use CTRL-Refresh to unload the cached classes the Virtual Machine for Java has loaded.


Connect to the Web page, using the IP address of the server, for example
http://172.23.21.38/myfolder/mypage.html


REFERENCES

The HOSTS file is documented in the Windows 95 Resource Kit, in a section titled HOSTS and LMHOSTS files for Windows 95.

Additional query words:

Keywords : AWTPkg NetPkg
Version : :; WINDOWS:2.0,2.01,4.0,4.01
Platform : WINDOWS
Issue type : kbbug


Last Reviewed: January 27, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.