Bug 14713 - Continuous loading [testcase]s
Summary: Continuous loading [testcase]s
Status: RESOLVED WORKSFORME
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: 3.0
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
: 100825 101175 137415 (view as bug list)
Depends on:
Blocks:
 
Reported: 2000-11-05 22:48 UTC by Alain Knaff
Modified: 2010-02-17 16:49 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alain Knaff 2000-11-05 22:42:49 UTC
(*** This bug was imported into bugs.kde.org ***)

Package: konqueror
Version: 3.0 (KDE 2.0)
Severity: wishlist
Compiler: gcc version 2.95.2 19991024 (release)
OS: Linux 2.2.16 i686 (compiled sources)

Many browsers today support "continous loading" which means that if a page is large or if
the server is just slow the various items get displayed as soon as they are available without
having to wait for the whole page to be finished.

However this does not seem to work in konqueror at least in some instances. Try out the
following cgi script:

#!/usr/bin/perl

use strict;
print "Content-Type: text/html\n\n";
$|=1;

for(my $i=0; $i<10; $i++) {
  print "Line $i<br>\n";
  sleep(1);
}


With netscape the ten lines are displayed on after the other with one second intervals.
With konqueror you have to wait 10 seconds and then get everything in one go. Not
good for cgi scripts that are long running but which display progress bars or
debugging output to reassure the user that it has not crashed...
Comment 1 Alain Knaff 2000-11-06 07:11:11 UTC
>Looks like kio_http waits till it has a full buffer. Do you happen to have a 
>URL with such a script running?

Yes here it is:

http://alain.knaff.linux.lu/bug-reports/kde/lineAfterLine.cgi

Regards

Alain
Comment 2 Waldo Bastian 2000-11-06 07:46:55 UTC
Looks like kio_http waits till it has a full buffer. Do you happen to have a 
URL with such a script running?

Cheers
Waldo

On Sunday 05 November 2000 14:42 Alain Knaff wrote:
> Package: konqueror
> Version: 3.0 (KDE 2.0)
> Severity: wishlist
> Compiler: gcc version 2.95.2 19991024 (release)
> OS: Linux 2.2.16 i686 (compiled sources)
>
> Many browsers today support "continous loading" which means that if a page
> is large or if the server is just slow the various items get displayed as
> soon as they are available without having to wait for the whole page to be
> finished.
>
> However this does not seem to work in konqueror at least in some
> instances. Try out the following cgi script:
>
> #!/usr/bin/perl
>
> use strict;
> print "Content-Type: text/html\n\n";
> $|=1;
>
> for(my $i=0; $i<10; $i++) {
>   print "Line $i<br>\n";
>   sleep(1);
> }
>
>
> With netscape the ten lines are displayed on after the other with one
> second intervals. With konqueror you have to wait 10 seconds and then get
> everything in one go. Not good for cgi scripts that are long running but
> which display progress bars or debugging output to reassure the user that
> it has not crashed...
Comment 3 Waldo Bastian 2000-11-06 09:21:14 UTC
On Sunday 05 November 2000 23:11 you wrote:
> >Looks like kio_http waits till it has a full buffer. Do you happen to have
> > a URL with such a script running?
>
> Yes here it is:
>
> http://alain.knaff.linux.lu/bug-reports/kde/lineAfterLine.cgi

Thanks hm the problem is not with kio_http. It nicely sends the data line 
by line to konqueror.

Does it matter if you replace the <br> with <p> ?

Cheers
Waldo
Comment 4 Alain Knaff 2000-11-06 18:48:22 UTC
>On Sunday 05 November 2000 23:11 you wrote:
>> >Looks like kio_http waits till it has a full buffer. Do you happen to have
>> > a URL with such a script running?
>>
>> Yes here it is:
>>
>> http://alain.knaff.linux.lu/bug-reports/kde/lineAfterLine.cgi
>
>Thanks hm the problem is not with kio_http. It nicely sends the data line 
>by line to konqueror.
>
>Does it matter if you replace the <br> with <p> ?

Yes replacing <br> with <p> does indeed change things: now it takes 3
seconds and the 3 first lines are displayed all at once. Then the
remaining 7 lines come with 1 second intervals as they should.

Ok so I performed some further tests: 

 - any sequence <p> + ~3 seconds delay + <p> switches konqueror in a
 mode where it updates after each subsequent <p>.
 - <table><tr><td> </td></tr></table> seems to work as well (instead
 of any of the <p>'s)
 - <b></b> is ok too.
 - Neither <b> nor </b> alone does the trick
 - <a name=$i></a> works too.
 - <form></form> works too and so does <em></em>
 - <em1></em1> doesn't
 - so it seems that any valid HTML tag accompanied by its closing tag
 is ok
 - alas no <br></br> doesn't do the trick :(

>
>Cheers
>Waldo

Regards

Alain
Comment 5 Alain Knaff 2001-02-05 21:43:26 UTC
Just for your information it seems the bug is still here in KDE 2.1
beta 2

Thanks

Alain

>On Sunday 05 November 2000 23:11 you wrote:
>> >Looks like kio_http waits till it has a full buffer. Do you happen to have
>> > a URL with such a script running?
>>
>> Yes here it is:
>>
>> http://alain.knaff.linux.lu/bug-reports/kde/lineAfterLine.cgi
>
>Thanks hm the problem is not with kio_http. It nicely sends the data line 
>by line to konqueror.
>
>Does it matter if you replace the <br> with <p> ?
>
>Cheers
>Waldo
Comment 6 Alain Knaff 2001-06-10 07:16:34 UTC
Just for your information: the bug is still here in KDE 2.2alpha. Will
this ever by fixed or is this a policy decision to only update
display when a <p> is received?

Continously updating is really useful for .cgi's that continously
print the output of a shell-script. Using <p> instead of <br> is
unfortunately not an option as it spaces the command's output too
much to look pleasing.

Thanks

Alain

>Just for your information it seems the bug is still here in KDE 2.1
>beta 2
>
>Thanks
>
>Alain
>
>>On Sunday 05 November 2000 23:11 you wrote:
>>> >Looks like kio_http waits till it has a full buffer. Do you happen to have
>>> > a URL with such a script running?
>>>
>>> Yes here it is:
>>>
>>> http://alain.knaff.linux.lu/bug-reports/kde/lineAfterLine.cgi
>>
>>Thanks hm the problem is not with kio_http. It nicely sends the data line 
>>by line to konqueror.
>>
>>Does it matter if you replace the <br> with <p> ?
>>
>>Cheers
>>Waldo

-----------------------------------------------------------------------.
Email: alain@linux.lu                         Alain Lucien Knaff       .
Tel(home): (352) 22 35 41                     19 rue Jean l'Aveugle   .
Tel(work): (352) 710 725 728                  L-1148 Luxembourg-City   .
Tel(GSM) : (352) 091 22 35 41                 Luxembourg               .
Comment 7 Dirk Mueller 2001-06-10 22:31:47 UTC
Hi 

yes currently its a design decision not to update the output till we 
receive a closing element. 
you can add something like <b></b><br> this should force an update. 

Eventually there will be a "timeout" update i.e. if we don't receive data 
for a to be specified amount of time like 1 second or so we'll update what 
we have in any case. 


Dirk
Comment 8 Alain Knaff 2001-06-11 05:27:01 UTC
>Hi 
>
>yes currently its a design decision not to update the output till we 
>receive a closing element. 
>you can add something like <b></b><br> this should force an update. 

This used to work some time ago (early 1.1 alphas?) but unfortunately
no longer does :-(

>
>Eventually there will be a "timeout" update i.e. if we don't receive data 
>for a to be specified amount of time like 1 second or so we'll update what 
>we have in any case. 
>
>
>Dirk

Please make that "if we don't receive any 'update triggering data' ".
Or else a script outputting a <br> terminated line each half second
will still not be updated until the end.

Alain
Comment 9 Michael Jahn 2004-07-03 13:02:10 UTC
Works for me with KDE 3.2.3. You don't have to wait 10s to see something - It displays it line be line. Can you still reproduce this?
Comment 10 Alain Knaff 2004-07-03 14:40:04 UTC
The bug is still there (KDE 3.2.3), although not as bad as it was.

The script prints the lines evenly spaced by one second each. However, konqueror occasionally waits 2 seconds, and then displays two at a time. So, some buffering is still apparently going on, although it is not as bad as it was.

By spacing lines by 2 seconds, not noticeable lumping together is seen. Good!

Removing the <br> (which would cause to go everything on one line) makes the problem worse: konqueror waits until EOF until it prints anything at all :-(

Same thing by using <pre>, and then printing lines separated just with \n : nothing appears for 10 seconds, and then everything is displayed all together.

Same thing if the document is declared as text/plain: konqueror waits for the entire document to be received to even print a single lines.

===> So it looks as if the bug is mostly fixed for the case where lines are separated by <br>, but many other methods of line separation (such as <pre>) seem not to be covered yet.
Comment 11 Michael Jahn 2004-07-07 11:53:27 UTC
http://alain.knaff.linux.lu/bug-reports/kde/lineAfterLine.cgi has been modified to use to <pre> display ten lines</pre>. Confirmed: Konqueror + IE wait 10s, Firefox displays these lines immediately.
Comment 12 Alain Knaff 2005-02-13 18:46:23 UTC
Problem still occurs in Konqueror 3.3.92 (with lines separated with newline in a <pre> section)
This works ok in Firefox.
However, it _does_ work (in Konqueror) with <br>-separated lines.
Comment 13 Tommi Tervo 2005-03-09 15:36:43 UTC
*** Bug 101175 has been marked as a duplicate of this bug. ***
Comment 14 Gerd v. Egidy 2005-03-09 15:54:00 UTC
Another server-side example - this time in PHP - can be found in the duplicate #101175.

I tried it with 3.3.2:
<pre>
line 1
line 2
...
</pre>
is displayed after the </pre> is received by konq.

<pre>line1</pre>
<pre>line2</pre>
...
is displayed line by line "live". But khtml seems to show an empty line after a </pre> so the output is unusable.
Comment 15 Tommi Tervo 2005-03-09 16:00:15 UTC
*** Bug 100825 has been marked as a duplicate of this bug. ***
Comment 17 Alain Knaff 2006-03-30 14:57:20 UTC
Still broken in 3.5.2
Comment 18 Bram Schoenmakers 2006-11-15 22:34:34 UTC
*** Bug 137415 has been marked as a duplicate of this bug. ***
Comment 19 Shriramana Sharma 2007-03-19 18:03:04 UTC
Except for lineAfterLine-pre.cgi, the others are loaded continuously for me in KDE 3.5.6 but -pre is loaded all at the end.

Perhaps this bug is partially fixed due to KHTML improvements?
Comment 20 Alain Knaff 2007-03-23 11:50:19 UTC
I have 3.5.6-3.fc5 , but plain is also only displayed at the end.
<b>, <br> and <p> work almost, but sometimes they wait for 2 lines until they display them...

===> So there are still issues here.

For comparison, firefox handles all cases correctly.
Comment 21 A. Spehr 2008-05-17 03:46:31 UTC
I thought a few of the recent commits implemented this... Will look and see.
Comment 22 A. Spehr 2008-11-23 01:02:45 UTC
"We've had that since forever." --Maks

so closing
Comment 23 Alain Knaff 2008-11-23 20:17:23 UTC
What does this mean? That bug-reports which have existed for too long are closed even if they haven't been fixed?

FYI, this is still broken in Konqueror 3.5.10
Comment 24 Alain Knaff 2009-05-14 00:11:38 UTC
FYI, this is still (again?) broken in 4.2.2 (with <pre>)
Comment 25 Alain Knaff 2010-01-17 18:01:45 UTC
Still broken in 4.2.4
Comment 26 Alain Knaff 2010-02-17 16:49:54 UTC
Still broken in 4.3.5