Hi Firstly I must confess I am not a Java Script developer. However I would like to create a simple script that fires off consecutive requests for the same URL so that I can performance profile my WebServer and WAS using IEWatch. Unfortunately IE aborts a request as soon as it sees a subsequent request for the same URL. Essentially what I am trying to do is to write a script which does synchonous GETs and measure the time taken for each GET - is there a way of forcing this synchronous behaviour in IE or tricking IE to wait for a response before going on to the next request? Advice gratefully received. -- Howard Ricketts SoftCASE Consulting www.softcase.co.uk
Howard Ricketts wrote: > Firstly I must confess I am not a Java Script developer. However I > would like to create a simple script that fires off consecutive > requests for the same URL so that I can performance profile my > WebServer and WAS using IEWatch. Unfortunately IE aborts a request > as soon as it sees a subsequent request for the same URL. > Essentially what I am trying to do is to write a script which does > synchonous GETs and measure the time taken for each GET - is there a > way of forcing this synchronous behaviour in IE or tricking IE to > wait for a response before going on to the next request? Consider using XMLHTTPRequest object. See http://msdn.microsoft.com/library/en-us/dhtmltechcol/cols/dnwebteam/webteam09032001.asp for a sample. It supports both synchronous and asynchronous requests. -- With best wishes, Igor Tandetnik With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea. It is hard to be sure where they are going to land, and it could be dangerous sitting under them as they fly overhead. -- RFC 1925
Thanks Igor for your response - tried out what you suggested but it appears we are using an IE build which does not allow use of ActiveX. -- Howard Ricketts SoftCASE Consulting www.softcase.co.uk "Igor Tandetnik" wrote: > Howard Ricketts wrote: > > Firstly I must confess I am not a Java Script developer. However I > > would like to create a simple script that fires off consecutive > > requests for the same URL so that I can performance profile my > > WebServer and WAS using IEWatch. Unfortunately IE aborts a request > > as soon as it sees a subsequent request for the same URL. > > Essentially what I am trying to do is to write a script which does > > synchonous GETs and measure the time taken for each GET - is there a > > way of forcing this synchronous behaviour in IE or tricking IE to > > wait for a response before going on to the next request? > > Consider using XMLHTTPRequest object. See > > http://msdn.microsoft.com/library/en-us/dhtmltechcol/cols/dnwebteam/webteam09032001.asp > > for a sample. It supports both synchronous and asynchronous requests. > -- > With best wishes, > Igor Tandetnik > > With sufficient thrust, pigs fly just fine. However, this is not > necessarily a good idea. It is hard to be sure where they are going to > land, and it could be dangerous sitting under them as they fly > overhead. -- RFC 1925 > > >
Hello, HR> Thanks Igor for your response - tried out what you suggested but it HR> appears we are using an IE build which does not allow use of HR> ActiveX. Won't the ActiveX security settings help? Internet Options, the "Security" tab and the last one for Advanced Settings. (H) Serge
Unfortunately here in JPM the Security tab is locked down so I cant change the level of security I apply. -- Howard Ricketts SoftCASE Consulting www.softcase.co.uk "Serge Baltic" wrote: > Hello, > > HR> Thanks Igor for your response - tried out what you suggested but it > HR> appears we are using an IE build which does not allow use of > HR> ActiveX. > > Won't the ActiveX security settings help? Internet Options, the "Security" > tab and the last one for Advanced Settings. > > (H) Serge > > >
"Howard Ricketts" wrote in message news:C1CA96AD-F9A7-47D0-B813-733FE175FA53@microsoft.com... > Unfortunately here in JPM the Security tab is locked down so I cant change > the level of security I apply. > -- > Howard Ricketts > SoftCASE Consulting > www.softcase.co.uk > > > "Serge Baltic" wrote: > >> Hello, >> >> HR> Thanks Igor for your response - tried out what you suggested but it >> HR> appears we are using an IE build which does not allow use of >> HR> ActiveX. >> >> Won't the ActiveX security settings help? Internet Options, the "Security" >> tab and the last one for Advanced Settings. >> >> (H) Serge >> >> >> If you're only testing your Web Server then perhaps you can use use a stand alone script that fetches the image. function saveRemoteFile(From, To) { var oXmlHttp = new ActiveXObject("Msxml2.XmlHttp.4.0"); //Change to version 3 if necessary oXmlHttp.open("GET", From, false); oXmlHttp.send(); if (oXmlHttp.status == 200) { var oStream = new ActiveXObject("Adodb.Stream"); oStream.type = 1; //Binary oStream.open(); oStream.write(oXmlHttp.responseBody); oStream.saveToFile(To, 2); oStream.close(); } else { throw new Error(oXmlHttp.statusText); //Needs improving } } //saveRemoteFile("http://www.hotmail.com", "C:\\hotmail.htm"); -- Joe