[Canberra-pm] [Fwd: Re: Writing output to a web browser like clearing a buffer]

John.Hockaday@ga.gov.au John.Hockaday at ga.gov.au
Sun Jun 26 17:40:18 PDT 2005


Fist of all thanks to Jacinta and Paul for responding to my email. 

Paul,

I had already tried setting $| =1; and that didn't fix the problem but it's
good to see that we were thinking along the same lines.

Jacinta,

You were right!  The output worked fine with Mozilla Firefox so the problem
was with Internet Explorer.  Although the output from the Perl script that I
was calling was wrapped in <pre> tags the virtual includes in the standard
header and footer called tables to structure the navigation bars.  I'll have
to work out how to present that same format with widths and colgroups and yet
still meet our organisation's header and footer requirements.

Thanks for the tip.


John 

> -----Original Message-----
> From: canberra-pm-bounces at pm.org 
> [mailto:canberra-pm-bounces at pm.org] On Behalf Of Jacinta Richardson
> Sent: Friday, 24 June 2005 6:23 PM
> To: canberra-pm at pm.org
> Subject: [Canberra-pm] [Fwd: Re: Writing output to a web 
> browser like clearing a buffer]
> 
> 
> Sorry, I forgot to send this to all just in case someone else 
> might disagree or 
> alternately find it useful...
> 
> -------- Original Message --------
> Subject: Re: [Canberra-pm] Writing output to a web browser 
> like clearing a buffer
> Date: Fri, 24 Jun 2005 17:17:57 +1000
> From: Jacinta Richardson <jarich at perltraining.com.au>
> Organization: Perl Training Australia Pty Ltd
> To: John.Hockaday at ga.gov.au
> References: <158ADDBA43E6C748BBD230A469EC6A4D9984CE at mail.ga.gov.au>
> 
> John.Hockaday at ga.gov.au wrote:
> 
> > Is there a way that I can clear the buffer to print to the 
> browser without
> > having to wait for the whole page to be generated?
> 
> Have you checked to make certain that the problem is with the 
> CGI script and not
> with the browser?  If your content is embedded in a great 
> many tables which
> exist purely for layout purposes, then you may find that your 
> browser is caching
> the response until it has sufficient information to render 
> everything correctly
> and only then giving you your output.  (This is why CSS is a 
> better alternative)
> 
> If this might be the cause, strip off all the formatting 
> information outside of
> your data and see if things improve.
> 
> If that doesn't help, try using something like wget to grab 
> the page and output
> it to a file.  Follow the file creation with a tail -f and 
> see whether all the
> data comes in one big lot, or continuously.
> 
> If your data is simple, but involves one huge table of 
> information, see whether
> you can improve matters by telling the browser how big the 
> table will be and how
> wide the columns are.  Use colgroup tags and percentage 
> widths to achive this.
> If this doesn't work, see if it is possible to break the 
> table up into smaller
> sections.  Careful use of colgroup information on your tables 
> can make it
> possible to have many separate tables still look like one big 
> one.  Both of
> these methods mean that your user can look at the first part 
> of the table while
> the other rows render.
> 
> If it definately *is* the CGI program (which sounds unlikely 
> as it should run
> almost as fast through the server as on the command line) 
> then we can all have
> fun trying to optimise it.  :)
> 
> All the best,
> 
>      Jacinta
> 
> -- 
>     ("`-''-/").___..--''"`-._          |  Jacinta Richardson         |
>      `6_ 6  )   `-.  (     ).`-.__.`)  |  Perl Training Australia    |
>      (_Y_.)'  ._   )  `._ `. ``-..-'   |      +61 3 9354 6001        |
>    _..`--'_..-_/  /--'_.' ,'           | contact at perltraining.com.au |
>   (il),-''  (li),'  ((!.-'             |   www.perltraining.com.au   |
> 
> 
> 
> 
> -- 
>     ("`-''-/").___..--''"`-._          |  Jacinta Richardson         |
>      `6_ 6  )   `-.  (     ).`-.__.`)  |  Perl Training Australia    |
>      (_Y_.)'  ._   )  `._ `. ``-..-'   |      +61 3 9354 6001        |
>    _..`--'_..-_/  /--'_.' ,'           | contact at perltraining.com.au |
>   (il),-''  (li),'  ((!.-'             |   www.perltraining.com.au   |
> 
> 
> _______________________________________________
> Canberra-pm mailing list
> Canberra-pm at pm.org
> http://mail.pm.org/mailman/listinfo/canberra-pm
> 


More information about the Canberra-pm mailing list