Discussion:
wininet asynchronous transfer in IE
(too old to reply)
d***@gmail.com
2007-08-15 13:41:37 UTC
Permalink
Am I right in thinking that it's not possible to perform asynchronous
tranfers in IE?

What I'm looking for is to be able to perform an HTTP request and
inspect the incoming HTTP response content as it arrives. Given the
material I have been able to find on the web about this, I have a
suspicion that IE always uses wininet in synchronous mode.

The reason for wanting this is to build a AJAX style MUD client that
is as responsive over distance as a regular telnet based MUD
connection. The killer in this application is the round trip time for
I/O using HTTP because of the request/response cycle.

On the custom HTTP server, I've tried both chunked transfers and
delaying the HTTP response data (with a Content-Length header). In
each case, I delivered the response in three parts over a four second
period.

In IE, I've tried XMLHttpRequest, loading via <script> elements and
just an HTML document with embedded <script> elements.

In all of these tests, I could not make IE react to the downloaded
content until after the entire HTTP request had been satisfied. On a
related note, both Firefox and Opera were able to process the incoming
HTTP content asynchronously, but Safari waited until the end like IE
does (all tests on Windows).

Silverlight might be my next option, though I was trying to produce a
zero-install solution!

--
Brick
Paul Baker [MVP, Windows - SDK]
2007-08-15 14:01:26 UTC
Permalink
What type of application are you writing?

Server-side script? Server side ISAPI? Other server-side? Client-side
script? ActiveX control? Other client-side?

I wouldn't be suprised if IE uses only synchronous WinInet and remains
responsive using threads. But it seems like what *you're* talking about is
not what IE itself does but what your application does. You're free to do
what you want. WinInet offers both synchronous and asynchronous operation
and you can read the response in chunks. WinHTTP allows you to read the
response in chunks from a stream and is scriptable.

Paul
Post by d***@gmail.com
Am I right in thinking that it's not possible to perform asynchronous
tranfers in IE?
What I'm looking for is to be able to perform an HTTP request and
inspect the incoming HTTP response content as it arrives. Given the
material I have been able to find on the web about this, I have a
suspicion that IE always uses wininet in synchronous mode.
The reason for wanting this is to build a AJAX style MUD client that
is as responsive over distance as a regular telnet based MUD
connection. The killer in this application is the round trip time for
I/O using HTTP because of the request/response cycle.
On the custom HTTP server, I've tried both chunked transfers and
delaying the HTTP response data (with a Content-Length header). In
each case, I delivered the response in three parts over a four second
period.
In IE, I've tried XMLHttpRequest, loading via <script> elements and
just an HTML document with embedded <script> elements.
In all of these tests, I could not make IE react to the downloaded
content until after the entire HTTP request had been satisfied. On a
related note, both Firefox and Opera were able to process the incoming
HTTP content asynchronously, but Safari waited until the end like IE
does (all tests on Windows).
Silverlight might be my next option, though I was trying to produce a
zero-install solution!
--
Brick
Vladimir Scherbina [MVP]
2007-08-19 18:09:28 UTC
Permalink
Hello Paul,

I think IE uses async model of wininet, because it exposes object model that
allows to handle BeforeNavigate, DocumentComplete handlers, which are
generally only possible in case of using async approach.
--
Vladimir, Windows SDK MVP
http://msmvps.com/blogs/v_scherbina/
Post by Paul Baker [MVP, Windows - SDK]
What type of application are you writing?
Server-side script? Server side ISAPI? Other server-side? Client-side
script? ActiveX control? Other client-side?
I wouldn't be suprised if IE uses only synchronous WinInet and remains
responsive using threads. But it seems like what *you're* talking about is
not what IE itself does but what your application does. You're free to do
what you want. WinInet offers both synchronous and asynchronous operation
and you can read the response in chunks. WinHTTP allows you to read the
response in chunks from a stream and is scriptable.
Paul
Post by d***@gmail.com
Am I right in thinking that it's not possible to perform asynchronous
tranfers in IE?
What I'm looking for is to be able to perform an HTTP request and
inspect the incoming HTTP response content as it arrives. Given the
material I have been able to find on the web about this, I have a
suspicion that IE always uses wininet in synchronous mode.
The reason for wanting this is to build a AJAX style MUD client that
is as responsive over distance as a regular telnet based MUD
connection. The killer in this application is the round trip time for
I/O using HTTP because of the request/response cycle.
On the custom HTTP server, I've tried both chunked transfers and
delaying the HTTP response data (with a Content-Length header). In
each case, I delivered the response in three parts over a four second
period.
In IE, I've tried XMLHttpRequest, loading via <script> elements and
just an HTML document with embedded <script> elements.
In all of these tests, I could not make IE react to the downloaded
content until after the entire HTTP request had been satisfied. On a
related note, both Firefox and Opera were able to process the incoming
HTTP content asynchronously, but Safari waited until the end like IE
does (all tests on Windows).
Silverlight might be my next option, though I was trying to produce a
zero-install solution!
--
Brick
Loading...