Re: Browser timing out.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I've been going with the invisible data mathod right now and it doesn't seem
too bad.  What happens on the page is not much to look at and it only
returns maybe 1K while the script is running. However, what's happening in
the background is a huge-ass transfer of data.

To the user, all that's happening is "Running . . ." until the process is
(almost) done, at which point it tells them approximately when their request
will be completed.  To clarify, this is a print-request system I'm
developing so people stop bugging me about stupid printing stuff.  They pick
everything they need, how many copies, and the system does the rest for
them, insuring that the prints will look the same each and every time and
waste will be reduced to near-zero.  The big-ass query/process is the
transfer of data files to the printer. The actual database work is small and
fast.

What I've gone with (and works fairly well) is a print of 4096 spaces after
a file is transferred followed by a period. The user gets to watch a dot get
printed to the screen about once a second while their stuff is queued up.  I
was hoping to avoid having to send a bunch of whitespace, but it seems to be
the only way I can prevent a timeout.

--JMR

Micah Stevens wrote:


Once the current page has loaded, the browser should display whatever it's 

recieved, no matter how small. 



I'm a little confused as to what you're trying to do, are you displaying a 

litlle 'Please Wait for the big ass query' message for the user while the
SQL 

plugs away? IF that's the case, you could do a HTML meta refresh to display
a 

page that shows the message and then switches over to the second page that 

actually does the query. This works pretty well. 



I've had mixed results with the flush() command. It seems to work sometimes 

with just 1 byte of data, and othertimes it will wait for get a big chunck. 

('it' being the browser)



as far as doing it all on the same page goes, your best bet to deal with the


buffer is to output invisible data. IT seems silly, but as you can't
remotely 

control the buffer size, it'd probably do the trick. 



personally, I use the two page method though.









On Thursday 21 August 2003 1:18 pm, J. Michael Roberts wrote:

  

Okay, I'm going mildly crazy now.



I've got a huge query that runs and does all sorts of things...but the

problem is that it's taking longer than the proxy server will allow to

generate the HTML, thus the browser (IE) reports a timeout.



I've successfully executed the entire script using Netscape, but Netscape

appears to be a little more forgiving with it's buffer size than IE does.



I've tried using a flush() call, but the output that is displayed to the

user is fairly small in comparasion to all the stuff that's going on in the

background.



Is there a way to get IE to display the data it has received on the fly? 

If not, is there a way to force IE (and netscape) to use a smaller buffer

size? I've thought about filling up the output buffer with some hidden

garbage, but that would just be silly.



Any thoughts would be greatly appreciated.



--JMR

    





  



[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux