It may be more appropriate to use ServerXMLHTTP on the server side to obtain arbitrary files on the Internet. You can set the expiration time to make the ASP program more efficient and reliable, as shown in the following table:
|
XMLHTTP |
ServerXMLHTTP |
1 |
Works on Windows, and ME |
Requires at least Windows NT 4 with IE5.01. |
2 |
Does not have a means of waiting for a async call other than using another thread to handle the response via Onreadystate Change. Another technique is to loop on the main thread, polling the ReadyState property. For example: While Xmlhttp.readystate <> 4 ' Async request not complete yet; Still waiting Wend But this isn't as efficient as the ServerXMLHTTP ' s waitForResponse method |
Has a waitForResponse method with a timeout when using async calls. |
3 |
|
Allows configuring timeouts when sending messages. |
| 4 |
is designed for single-us Er, desktop applications, such as running in a browser-based app. XMLHTTP ' s assumption that it's used only in single-user environments has security implications. The do not with XMLHTTP in multi-user scenarios such as on iis/asp servers. Also, in various cases, XMLHTTP could display UI dialogs (to collect credentials). |
Supports Multi-User, server-based applications, such as ASP apps. |
5 |
Because XMLHTTP is designed for Single-user client applications and are based on WinInet, it enforces strict on the Number of simultaneous connections to a given server. The limit is either 2 or 4 (depending on HTTP version). |
The ServerXMLHTTP component does not impose any limits on the number of connections to a server. |
6 |
XMLHTTP integrates with the IE browser's cache, which may cause problems in which "stale" response the data is returned. |
ServerXMLHTTP does not implement a cache. |
7 |
XMLHTTP is http/1.1 compliant. XMLHTTP does support http/1.1 chunking. |
ServerXMLHTTP reports itself as an http/1.0 client. The reason is this serverxmlhttp does not support the http/1.1 response "chunking" feature, which are required for 1.1 Liance. |
8 |
By using the IE browser ' s proxy settings, XMLHTTP can take advantage of IE ' s auto-de Tection of proxy servers. If IE is configured to access sites via proxy server, then all requests made via XMLHTTP'll also go through the pro XY. However, IE (and thus XMLHTTP) can is configured to bypass the proxy server for certain sites (assuming that a direct C Onnection to the target server can be made. This are done in the "Tools/internet Options/connections/lan Settings" dialog in IE. The Bypass proxy server for local addresses option should is checked to have the proxy server bypassed for intranet s Ites. |
ServerXMLHTTP does not support any auto-detection or discovery of proxy servers; You must explicitly specify the name of the proxy server using the Proxycfg.exe utility. Can is configured with WinHTTP Proxy config to access other machines directly (no proxy server). |
9 |
The XMLHTTP component in MSXML 3.0 supports automatic gzip decompression; |
ServerXMLHTTP does not. |
This shows that in the server-side using ASP to get any file on the Internet to use ServerXMLHTTP may be more appropriate. You can set the expiration time to make the ASP program more efficient and reliable