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 7 6993
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*******@NOCR APTHANKStiscali .co.uk> wrote in message
news:ua******** ******@tk2msftn gp13.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
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******** ******@TK2MSFTN GP10.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*******@NOCR APTHANKStiscali .co.uk> wrote in message news:ua******** ******@tk2msftn gp13.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
Your code work perfectly well on my XP Pro workstation, with the web server
being on the same machine.
Maybe you are separated from you Windows Server with a firewall or a proxy
who is buffering the whole thing. Your LAN may also be involved.
I suggest that you install the web server directly on you station and then
making somes tests with that configuration.
S. L.
"Jon Spivey" <jo*******@NOCR APTHANKStiscali .co.uk> wrote in message
news:ua******** ******@tk2msftn gp13.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
I've run into this problem before and I've yet to find a definitive answer.
I believe that it's a browser issue, actually. When I loaded your code on
my W2K server, it did not [seem to] flush just as you described. Then I
added the long comment and it worked. Then I restored the code back to
exactly what you posted and it flushed that time. Inconsistencies do not
make sense. I believe that if you quickly do a view-source while you're
waiting for your flush, you may actually see the <p>started</p> in there.
Ray at work
"Jon Spivey" <jo*******@NOCR APTHANKStiscali .co.uk> wrote in message
news:%2******** **********@TK2M SFTNGP12.phx.gb l... 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******** ******@TK2MSFTN GP10.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*******@NOCR APTHANKStiscali .co.uk> wrote in message news:ua******** ******@tk2msftn gp13.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
I'm working on my laptop at the moment IIS on the same machine - no lan
firewall proxy etc. The real issue here is the site I'm working on that I
posted up earlier - not being able to get response.flush working is ruining
the site.
Just for the heck of it I uploaded Ray's code with the long string here http://www.roksteady.net/flushed.asp
The flush works on my dev machine but is not happening on the web server -
running IIS6 Windows Server 2003. Also tested in Netscape 7 and firebird
just to be sure it isn't an IE thing. I wonder if response.flush( ) is
somewhat flakey or there is something I'm missing here. Either way I need to
get to the bottom of this
Jon
"Sylvain Lafontaine" <sylvain aei ca (fill the blanks, no spam please)>
wrote in message news:Op******** ******@tk2msftn gp13.phx.gbl... Your code work perfectly well on my XP Pro workstation, with the web
server being on the same machine.
Maybe you are separated from you Windows Server with a firewall or a
proxy who is buffering the whole thing. Your LAN may also be involved.
I suggest that you install the web server directly on you station and then making somes tests with that configuration.
S. L.
"Jon Spivey" <jo*******@NOCR APTHANKStiscali .co.uk> wrote in message news:ua******** ******@tk2msftn gp13.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
As far as I can see this must be a server issue - from my testing the exact
same pages that refuse to flush on my IIS6 web server flush perfectly on 2
IIS5.1 computers here. Still trying to get to the bottom of this but running
out of ideas.....
Jon
"Ray at <%=sLocation% >" <myfirstname at lane34 dot com> wrote in message
news:uj******** ******@tk2msftn gp13.phx.gbl... I've run into this problem before and I've yet to find a definitive
answer. I believe that it's a browser issue, actually. When I loaded your code on my W2K server, it did not [seem to] flush just as you described. Then I added the long comment and it worked. Then I restored the code back to exactly what you posted and it flushed that time. Inconsistencies do not make sense. I believe that if you quickly do a view-source while you're waiting for your flush, you may actually see the <p>started</p> in there.
Ray at work
"Jon Spivey" <jo*******@NOCR APTHANKStiscali .co.uk> wrote in message news:%2******** **********@TK2M SFTNGP12.phx.gb l... 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******** ******@TK2MSFTN GP10.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*******@NOCR APTHANKStiscali .co.uk> wrote in message news:ua******** ******@tk2msftn gp13.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 > >
Did some more searching and found the answer - it seems IIS6 has some
performance issues with response.flush with a fix due in the first SP http://groups.google.com/groups?hl=e...TF-8%26hl%3Den
Solved my own issue with a very nasty hack
do db lookup then stop
javascript to redirect to the same page
finish processing page
This accomplishes almost the same thing as response.flush( ) but we shouldn't
have to do things like this on supposedly "better" products
Jon
"Jon Spivey" <jo*******@NOCR APTHANKStiscali .co.uk> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. .. As far as I can see this must be a server issue - from my testing the
exact same pages that refuse to flush on my IIS6 web server flush perfectly on 2 IIS5.1 computers here. Still trying to get to the bottom of this but
running out of ideas.....
Jon
"Ray at <%=sLocation% >" <myfirstname at lane34 dot com> wrote in message news:uj******** ******@tk2msftn gp13.phx.gbl... I've run into this problem before and I've yet to find a definitive answer. I believe that it's a browser issue, actually. When I loaded your code
on my W2K server, it did not [seem to] flush just as you described. Then I added the long comment and it worked. Then I restored the code back to exactly what you posted and it flushed that time. Inconsistencies do
not make sense. I believe that if you quickly do a view-source while you're waiting for your flush, you may actually see the <p>started</p> in
there. Ray at work
"Jon Spivey" <jo*******@NOCR APTHANKStiscali .co.uk> wrote in message news:%2******** **********@TK2M SFTNGP12.phx.gb l... 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******** ******@TK2MSFTN GP10.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*******@NOCR APTHANKStiscali .co.uk> wrote in message > news:ua******** ******@tk2msftn gp13.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 > > > > > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Copa |
last post by:
Hello,
I am testing buffering an asp page and Flushing information out to the
browser, hence i wrote the code in an asp page that follows this Message
Post.
The loops are suppose to simulate long search processes with a flush after
each search.
When i Navigate to the page, redirect to it from another page, or type the
URL to this page in...
|
by: Dominic Godin |
last post by:
Hi,
I have an asp page that does a lot of processing and reports it's
finished by printing the word "Success". For example:
<% SomeFunction(SomeVar)
SomeFunction(SomeVar1)
SomeFunction(SomeVar3)
|
by: Luiz Vianna |
last post by:
Guys,
I need to send some info to my client while I'm processing some stuff. The flow will be something like :
-process
-response
-process
-response
....
I imagine to use response.flush (as I did on ASP) but it does not work. See my test code, after sending 2 lines on response, I'm simulating a processing time before sending other 2...
|
by: Dan |
last post by:
Hi
I've created a generic 'Report' class that takes a DataView from a DataGrid control and writes it out to the response as a csv file for download. Basically, when a user clicks the download button on the page, this class is instantiated and the download method called. The odd thing is you get the Save/Open dialog popup twice!! Any ideas...
|
by: David Union |
last post by:
Hi.
I'm posting this here because I don't know exactly what the best group is.
This is for an aspx page with Visual Basic as the code-behind page.
I am doing very simple code...
in the middle of an http request, i set a filename (with path)
and do a Response.WriteFile(filenamewithpath)
then Response.End().
I have tried Response.Clear()...
| |
by: Mantas Miliukas |
last post by:
Hi,
I have problem when flushing the generated HTML code to the client.
It seems that "Page.Response.Flush()" method doesn't work at all.
See my code below:
protected override void Render(HtmlTextWriter writer)
{
for (int i = 0; i < 100; i ++)
{
|
by: Lars Netzel |
last post by:
I want to press a Linkbutton (in a DatagridItem) and return a file that is
not shared in the IIS. I want to disallow "deeplinking".
The following code works fine (it sends the file I want) but I want it to be
parallel to the webpage, not replacing the page with the datagrid.. how do I
force the file download to a new window?
Public Sub...
|
by: jose.mendez22 |
last post by:
I'm trying to fire a pop-up window before I execute a lengthy stored
procedure so I may utilize this window as a status window on number of
records executed. After my response.write statements which include the
javascript I call the flush mehtod, which seems is ignored? However
when I mimic the same process using a loop (and no ado object)...
|
by: Jim Rodgers |
last post by:
I have a big asp file that has an error under certain conditions -- totally
repeatable. However, it only fails when I set response.buffer = True at the
top. WHen I set it False in order to debug it, it works every time! I even
set it to True, but did a .Flush just before the error, and the error won't
happen.
It only happens when...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |