Hello,
I use a check tool in a Javascript to get the HTTP status (200, 404, etc...) of severals pages (
http://@IP/une_page.htm) in the to print it in a html page. This is working client side. Here is my code :
function checkURLStatus(url)
{
var http = new ActiveXObject('Microsoft.XMLHTTP'); // or Msxml2.XMLHTTP.3.0
http.open('HEAD', url, true); // Asynchronous request
try
{
http.send();
do
{
... loop for response timeout ...
}
while(http.readyState != 4);
}
catch(erreur)
{
return 'Err';
}
return (http.status);
}
This used to work under IE5.x but it doesn't with IE6 (v6.0.2600).
The readyState always keep the value 1.
A synchronous request (false instead of true) works but if the requested server is down IE freezes about 20 seconds.
If someone have any idea ?
JFB