RE: Progress bars and HTML generation
RE: Progress bars and HTML generation
- Subject: RE: Progress bars and HTML generation
- From: email@hidden
- Date: Wed, 2 Jan 2008 17:37:00 -0500
Your problem is most likely the amount
of time for the HTML to transfer over the network to the browser. Generally
it is generated pretty quickly on the server but it just takes a long time
to spoon it out.
Most web browsers try to render the
HTML as it gets it but if it is a table or some other complex structure
and the data is coming really fast, you'll be in a state where it looks
like the browser is doing nothing while all the data is flooding in.
There are two roads you can follow:
1) Put an animated GIF at the very top
of the page and make sure it is not part of a table or anything, just directly
after the body tag. At the very end, before the trailing body tag, you
could do a bit of inline _javascript_ to set the style of the image to "display:
none;". Technically cleaner would be at add an event listener to window.onload
instead of the inline _javascript_ but both are ok. This way the animated
GIF progress bar will be immediately renderred and when the HTML is finally
all done, the progress bar will vanish.
2) You could re-architect the generated
html into "bite sized chunks". If you have lots of little tables,
instead of one big complex table, then each mini table will be shown to
the user as the HTML for it has finished coming down the pipe. The effect
would be seeing the page slowly develop and the vertical scroll bar getting
longer and longer.
-- Aaron
Paul said:
> I have relied on WOLongResponsePage for situations
where I have
> time-consuming calculations or database processes whose progress I
> can track.
> But I can't help but wonder if there isn't a strategy to request a
> page generated from a component, put up a progress bar while it's
> generating, and then just hand it off to the server when it's ready.
-- Paul
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden