The HTML could look like this, for example.
As soon as the computation starts, either an HTTP header like
NOTING-PROGRESS: Searching database
or maybe an HTML tag would be better, like
<NOTING-PROGRESS DESCRIPTION="Searching database" NOUN="record" VERB="fetching">
Later, the server would send, intermingled with the real text (but not inside a tag)
<NOTE-PROGRESS 100/5000>
and later
<NOTE-PROGRESS 500/5000>
and still later
<NOTE-PROGRESS 900/5000>
and finally
</NOTING-PROGRESS>
and it would ensure that output packets are sent every few seconds
even if they're not full (that is, fflush(stream) in C, (force-output stream)
in Lisp, and so on).
The tags would not be rendered, of course. The client could ignore the
information or present it to the user in any of a number of ways:
1. A progress bar, like the Macintosh Finder or the Symbolics Lisp Machine.
2. An animation of an hourglass sifting sand, or a drinking glass filling up,
or a watch hand turning 360 degrees, or a day/night terminator moving on
Mosaic's rotating globe, etc.
3. A printed estimate of time remaining, like many applications
including Mac ZTerm's zmodem display
Time elapsed / remaining: 1:23 / 4:56
where the first number counts up at a constant rate and the
second counts down at a non-constant rate as the estimage changes.
The verb and noun could optionally be displayed by the client, as in
"Now fetching Record 500 of 5000 records".
-- --Bob Kanefsky (Recom Technologies) Artificial Intelligence Research Branch NASA Ames Research Center