AJAX - The Complete Reference

(avery) #1

244 Part II: Developing an Ajax Library^


It turns out that the document.domain idea does work somewhat for loosening the
same origin policy, but that unfortunately doesn’t help Ajax much for sending more than
two requests at a time as the domain is now set to be ajaxref.com across the board so it still
has the two request limit. It is probably for the best because if it was easy to accomplish, it
would likely lead to all sorts of mischief as there are other uses for document.domain in
regards to security. The same origin policy and loosening of the policy via JavaScript will be
discussed at length in the next chapter.

Browser Modifications
Another possible solution to this problem that is not likely to be used much is modifying
the browser’s settings. For example, type about:config in the location window for
Firefox. You may then find the section that limits the max persistent connections and modify
it, as shown here:

In the case of Internet Explorer you can do the same thing with a registry setting.
According to a Microsoft Support entry, you perform the following steps:


  1. Start Registry Editor (Regedt32.exe).

  2. Locate the following key in the registry:


HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet
Settings


  1. On the Edit menu, point to New, click DWORD Value, and then add the following
    registry values:
    Value name: MaxConnectionsPer1_0Server
    Value data: 10
    Base: Decimal
    Value Name: MaxConnectionsPerServer

Free download pdf