AJAX - Connectivity Enhancements in Windows Internet Explorer 8

Windows Internet Explorer 8 contains several important connectivity enhancements that can improve both the performance and functionality of Asynchronous JavaScript and XML (AJAX) and other Web applications. These enhancements include an increase in the maximum number of concurrent connections from a single host, and the addition of connectivity events.

This topic contains the following sections.

Concurrent Connections

With Internet Explorer 8, the maximum number of concurrent connections from a single host process connecting via broadband to a single server has been increased to 6. In Windows Internet Explorer 7 and earlier, the maximum number of concurrent connections per host process to a single server via HTTP 1.1 is 2. For HTTP 1.0, the limit is 4, though HTTP 1.1 connections are far more common today. Note that the maximum number of concurrent connections from a single host process connecting through dial-up (for instance, with a modem over a telephone line) to a single server remains the same as for Internet Explorer 7 and earlier.

The following table summarizes the maximum number of concurrent connections based on the version of Windows Internet Explorer running on the host, the host's connection speed, and the server's supported protocol version.

VersionHTTP 1.0 server (broadband connection)HTTP 1.1 server (broadband connection)HTTP 1.0 server (dial-up connection)HTTP 1.1 server (dial-up connection)
Internet Explorer 7 and earlier4242
Internet Explorer 86642

 

Some Background

While the four-connection limit for HTTP 1.0 was set to match the behavior of most other browsers at the time, the two-connection limit for HTTP 1.1 was due to a mandate that was established in the HTTP 1.1 specification (Request for Comment 2616). At the time the standard was first drafted (January 1997), the two-connection limit was appropriate, considering the dominance of dial-up Internet connections and the scarcity of broadband connections.

Since the HTTP 1.1 standard was drafted, however, high-bandwidth connections have become more commonplace, thereby negating client-side bandwidth as a gating factor in connection speed. Typically, the time required to setup a connection and send a request comprises most of the time spent retrieving individual objects. In addition, the improved capabilities of today's Web and proxy servers reduces the risk of overwhelming the network infrastructure with an increase in per-host connections. The need for more per-host connections is especially strong considering the increase in popularity of AJAX applications and pages, many of which send large amounts of data asynchronously.

New Scriptable Connection Property

You may have compatibility concerns with this new behavior if you had implemented workarounds to circumvent the previous limitations. In that case, to avoid overwhelming your Web server, you may wish to tailor content delivery based on the number of connections each client computer is capable of having open concurrently. To that end, Internet Explorer 8 includes the window.maxConnectionsPerServer object, which enables your server to determine the number of available connections on the client computer.

In Internet Explorer 8, maxConnectionsPerServer will return 6 on a broadband connection unless a user or an administrator has overridden the defaults. If the client computer is connected through dial-up, maxConnectionsPerServer will return 2 if connected to an HTTP 1.1 server or 4 if connected to an HTTP 1.0 server.

Changing the Number of Maximum Concurrent Connections

Users or administrators who experience problems with page load times can change the number of maximum concurrent connections to a single server. The first method enables you to change the limits to a value you choose. The second method changes the limits by using Group Policy.

Important  This section contains information about how to modify the registry. Make sure that you back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, see How to back up and restore the registry in Windows in the Microsoft Knowledge Base.

Method 1: Changing Values by Using a Feature Control Key

  1. Start Regedit.
  2. For HTTP 1.1 connections, navigate to the following feature control key. If it doesn't already exist, create it.
    HKEY_LOCAL_MACHINE (or HKEY_CURRENT_USER)
       SOFTWARE
          Microsoft
             Internet Explorer
                MAIN
                   FeatureControl
                      FEATURE_MAXCONNECTIONSPERSERVER

    Note  You can change or add FEATURE_MAXCONNECTIONSPERSERVER at the same location within either HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER. The effect is identical.

  3. Create a new DWORD called iexplore.exe and set its value data to the desired connection limit for HTTP 1.1 connections. For example, setting the value to 0000002 will match the limit from Internet Explorer 7 and earlier.
  4. For HTTP 1.0 connections, navigate to the following feature control key. If it doesn't already exist, create it.
    HKEY_LOCAL_MACHINE (or HKEY_CURRENT_USER)
       SOFTWARE
          Microsoft
             Internet Explorer
                MAIN
                   FeatureControl
                      FEATURE_MAXCONNECTIONSPER1_0SERVER

    Note  You can change or add FEATURE_MAXCONNECTIONSPER1_0SERVER at the same location within either HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER. The effect is identical.

  5. Create a new DWORD called iexplore.exe and set its value data to the desired connection limit for HTTP 1.0 connections. For example, setting the value to 0000004 will match the limit from Internet Explorer 7 and earlier.

Method 2: Changing Values by Using Group Policy

You can change the number of maximum concurrent connections to a single server by using Group Policy, as described in this section. The simplest way is by using the Group Policy Editor, which is listed first. You can also edit a feature control key, which is listed second.

Group Policy Editor Method

  1. Run gpedit.msc.
  2. Expand User Configuration (or Computer Configuration), Administrative Templates, Windows Components, Internet Explorer, Security Features, and then AJAX.
  3. Set Maximum number of connections per server (HTTP 1.0) and Maximum number of connections per server (HTTP 1.1) according to your desired settings. You will have to update policies or restart the computer to apply your changes.

Feature Control Key Method

  1. Start Regedit.
  2. For HTTP 1.1 connections, navigate to the following feature control key. If it doesn't already exist, create it.
    HKEY_LOCAL_MACHINE (or HKEY_CURRENT_USER)
       SOFTWARE
          Policies
             Microsoft
                Internet Explorer
                   MAIN
                      FeatureControl
                         FEATURE_MAXCONNECTIONSPERSERVER

    Note  You can change or add FEATURE_MAXCONNECTIONSPERSERVER at the same location within either HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER. The effect is identical.

  3. Create a new DWORD called iexplore.exe and set its value data to the desired connection limit for HTTP 1.1 connections. For example, setting the value to 0000002 will match the limit from Internet Explorer 7 and earlier.
  4. For HTTP 1.0 connections, navigate to the following feature control key. If it doesn't already exist, create it.
    HKEY_LOCAL_MACHINE (or HKEY_CURRENT_USER)
       SOFTWARE
          Policies
             Microsoft
                Internet Explorer
                   MAIN
                      FeatureControl
                         FEATURE_MAXCONNECTIONSPER1_0SERVER

    Note  You can change or add FEATURE_MAXCONNECTIONSPER1_0SERVER at the same location within either HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER. The effect is identical.

  5. Create a new DWORD called iexplore.exe and set its value data to the desired connection limit for HTTP 1.0 connections. For example, setting the value to 0000004 will match the limit from Internet Explorer 7 and earlier.

Connectivity Status Improvements

Internet Explorer 8 enables your page or application to query whether the browser has a network connection. In Internet Explorer 7 and earlier, this functionality does not exist, and can therefore lead to an undesirable user experience should the user's computer lose connectivity.

New onLine Property Functionality

The onLine property (of both the window.navigator and window.clientInformation objects) has been available since Microsoft Internet Explorer 4.0. However, in Internet Explorer 4.0 through Internet Explorer 7, the onLine property only indicates whether the system is in "global offline mode," which users initiate by choosing Work Offline from the File menu. In those versions, the onLine property does not indicate whether the system is connected to the network. In Internet Explorer 8 and later, however, the onLine property indicates whether the system is actually connected to the network.

To query the network connection status, call window.navigator.onLine. The property returns true if the system is connected to the network, and false if not.

New Simple Events

When the window.navigator.onLine property changes after a page is loaded, a simple event is raised on the page's body element as follows.

  • If onLine changes from true to false, the offline simple event is raised on the body element.
  • If onLine changes from false to true, the online simple event is raised on the body element.

For more information on raising events on HTML elements, see the HTML5 (Working Draft) on the World Wide Web Consortium (W3C) Web site. The online and offline events comply with the W3C HTML 5 Working Draft as of November 2008.

You can disable the connectivity events with a feature control key. To do this, follow these steps:

  1. Start Regedit.
  2. Navigate to the following feature control key. If it doesn't already exist, create it.

    HKEY_LOCAL_MACHINE (or HKEY_CURRENT_USER)
       SOFTWARE
          Microsoft
             Internet Explorer
                MAIN
                   FeatureControl
                      FEATURE_AJAX_CONNECTIONEVENTS

    Note  You can change or add FEATURE_AJAX_CONNECTIONEVENTS at the same location within either HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER. The effect is identical.

  3. Create a new DWORD called iexplore.exe and set its value data to 0000000.

If, after creating the registry key, you want to enable connectivity events again, you can set the value for iexplore.exe to 0000001.

New Callback Handlers

To indicate a change in the status of a connection, Internet Explorer 8 introduces the following callback handlers:

  • The onoffline handler is raised when the user's computer loses its network connection—for example, when the network cable is unplugged or the network adapter is disabled. It is also raised when the user toggles the Work Offline setting on.
  • The ononline handler is raised when the computer's network connection is restored. It is also raised when the user toggles the Work Offline setting off.

Related topics

Web Applications
XMLHttpRequest Enhancements in Internet Explorer 8
Introducing AJAX Navigations

 

 

Show:
© 2014 Microsoft