Hi,
thanks for the reply I tried adding some more text to my little sample and
guess what - the flush happened on my dev machine XP Pro/IIS5.1 but not my
web server IIS6/Windows Server 2003. My problem is I'm working on this site
www.bookhead.co.uk if you click any of the book links the next page pulls
the book details from sql server 2000 then uses xmlhttp to get prices for
the book from 11 retailers. The db lookup is quick, the xmlhttp part can
take about 10 seconds - so I put response.flush() after the db lookup, the
flush isn't happening with the result that the page takes about 10 seconds
to display - obviously unacceptable so I need to fix this
I can't post up the code for the page I'm working on its ~150 lines is there
something you can think of that would stop response.flush() from happening?
I've also written my host to see if they have any ideas
Jon
"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
news:Ox**************@TK2MSFTNGP10.phx.gbl...
I believe there's a thing about certain browsers, i.e. IE, where they
won't display anything until the response they've received is of a minumum
number of bytes. I don't know what the minimum is, though. You could try adding
a line like so above the <p>started</p> line:
response.write "<!-- " & String(200, "x") & " -->"
BTW, do you know that your for-loop is essentially doing a Step 2? You
don't have to increment the looping variable.
Ray at work
"Jon Spivey" <jo*******@NOCRAPTHANKStiscali.co.uk> wrote in message
news:ua**************@tk2msftngp13.phx.gbl... Experimenting with response.flush() but can't seem to get it to work.
This code
<%
response.write "<p>started</p>"
response.flush()
for i = 1 to 10000000
i = i +1
next
response.write "<p>ended</p>"
%>
Should it not write started to the screen straight away and then a
couple of seconds later, when the loops finished, write ended? When I test on XP
Pro and Windows Server 2003 the flush doesnt happen - the page takes a
couple of seconds to load up and then writes started ended at the same time.
Also found this article on aspfaq
http://www.aspfaq.com/show.asp?id=2498
but the response.flush() doesn't happen with that sample code either
Any ideas?
Jon