partial page display

2002-11-26 Thread FFabrizio

I would like to have some of the page display while the rest of the data for
the page is still being retrieved (i.e. a Please wait, this operation takes
several seconds...  kind of message).  I thought (perhaps naively) that a
print Please wait.\n; at the beginning of my handler would accomplish
this, but mod_perl seems to cache all output until the entire handler has
returned.  Is this possible without the use of a module like CGI::Push?
Perhaps I need to modify the header?

Thanks, 
Fran 



Re: partial page display

2002-11-26 Thread Issac Goldstand
local $|=1;

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, November 26, 2002 9:11 PM
Subject: partial page display



 I would like to have some of the page display while the rest of the data
for
 the page is still being retrieved (i.e. a Please wait, this operation
takes
 several seconds...  kind of message).  I thought (perhaps naively) that a
 print Please wait.\n; at the beginning of my handler would
accomplish
 this, but mod_perl seems to cache all output until the entire handler has
 returned.  Is this possible without the use of a module like CGI::Push?
 Perhaps I need to modify the header?

 Thanks,
 Fran





RE: partial page display

2002-11-26 Thread FFabrizio

That doesn't work for us.  It seems that the browser also maintains a
buffer, because if I loop the please wait message 1 times, it does show
up immediately.  I suspect possibly there's some massaging we can do to the
header?

Thanks,
Fran

-Original Message-
From: Issac Goldstand [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 26, 2002 2:13 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: partial page display


local $|=1;

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, November 26, 2002 9:11 PM
Subject: partial page display



 I would like to have some of the page display while the rest of the data
for
 the page is still being retrieved (i.e. a Please wait, this operation
takes
 several seconds...  kind of message).  I thought (perhaps naively) that a
 print Please wait.\n; at the beginning of my handler would
accomplish
 this, but mod_perl seems to cache all output until the entire handler has
 returned.  Is this possible without the use of a module like CGI::Push?
 Perhaps I need to modify the header?

 Thanks,
 Fran




RE: partial page display

2002-11-26 Thread Jim Martinez
After much thought on Nov 26 [EMAIL PROTECTED] wrote:

 I suspect possibly there's some massaging we can do to the header?

I wonder if your thinking of the meta tag refresh :

META HTTP-EQUIV=Refresh CONTENT=45;URL=http://mydomain.com/tracking.pl

Is this a good idea?  I hope so, because I'm using it.

Jim





Re: partial page display

2002-11-26 Thread Issac Goldstand
Add a BR/ tag.  That's what I throw in to force the browser to flush
whatever I fed it onto the screen...

  Issac

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, November 26, 2002 9:25 PM
Subject: RE: partial page display



 That doesn't work for us.  It seems that the browser also maintains a
 buffer, because if I loop the please wait message 1 times, it does
show
 up immediately.  I suspect possibly there's some massaging we can do to
the
 header?

 Thanks,
 Fran

 -Original Message-
 From: Issac Goldstand [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, November 26, 2002 2:13 PM
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Re: partial page display


 local $|=1;

 - Original Message -
 From: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, November 26, 2002 9:11 PM
 Subject: partial page display


 
  I would like to have some of the page display while the rest of the data
 for
  the page is still being retrieved (i.e. a Please wait, this operation
 takes
  several seconds...  kind of message).  I thought (perhaps naively) that
a
  print Please wait.\n; at the beginning of my handler would
 accomplish
  this, but mod_perl seems to cache all output until the entire handler
has
  returned.  Is this possible without the use of a module like CGI::Push?
  Perhaps I need to modify the header?
 
  Thanks,
  Fran
 





RE: partial page display

2002-11-26 Thread FFabrizio

Thanks, finally found the right combination...

  {
local $| = 1;
$r-content_type('text/html');
$r-send_http_header;
print Testing...\n;
  }

-Fran

-Original Message-
From: Issac Goldstand [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 26, 2002 4:28 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: partial page display


Add a BR/ tag.  That's what I throw in to force the browser to flush
whatever I fed it onto the screen...

  Issac

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, November 26, 2002 9:25 PM
Subject: RE: partial page display



 That doesn't work for us.  It seems that the browser also maintains a
 buffer, because if I loop the please wait message 1 times, it does
show
 up immediately.  I suspect possibly there's some massaging we can do to
the
 header?

 Thanks,
 Fran

 -Original Message-
 From: Issac Goldstand [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, November 26, 2002 2:13 PM
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Re: partial page display


 local $|=1;

 - Original Message -
 From: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, November 26, 2002 9:11 PM
 Subject: partial page display


 
  I would like to have some of the page display while the rest of the data
 for
  the page is still being retrieved (i.e. a Please wait, this operation
 takes
  several seconds...  kind of message).  I thought (perhaps naively) that
a
  print Please wait.\n; at the beginning of my handler would
 accomplish
  this, but mod_perl seems to cache all output until the entire handler
has
  returned.  Is this possible without the use of a module like CGI::Push?
  Perhaps I need to modify the header?
 
  Thanks,
  Fran
 




Re: partial page display

2002-11-26 Thread Stas Bekman
[EMAIL PROTECTED] wrote:

Thanks, finally found the right combination...

  {
local $| = 1;
$r-content_type('text/html');
$r-send_http_header;
print Testing...\n;
  }


Peruse the docs and they will save your time:
http://perl.apache.org/docs/1.0/guide/performance.html#Using1_Under_mod_perl_and_Better_print___Techniques_

__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com




Re: partial page display

2002-11-26 Thread Stas Bekman
Jim Martinez wrote:

After much thought on Nov 26 [EMAIL PROTECTED] wrote:



I suspect possibly there's some massaging we can do to the header?



I wonder if your thinking of the meta tag refresh :

META HTTP-EQUIV=Refresh CONTENT=45;URL=http://mydomain.com/tracking.pl

Is this a good idea?  I hope so, because I'm using it.


Nope, especially when you *can* control the HTTP response headers.

This HTML extension is not supported by all browsers.
See http://marc.theaimsgroup.com/?l=apache-modperlm=103658812122901w=2
Instead you should use the HTTP headers to do that. The following 
thread discusses this issue to death:
http://marc.theaimsgroup.com/?t=10365327621r=1w=2


__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com



Re: partial page display

2002-11-26 Thread Mike Williams
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Tuesday 26 November 2002 04:27 pm, Jim Martinez wrote:
 I wonder if your thinking of the meta tag refresh :

 META HTTP-EQUIV=Refresh
 CONTENT=45;URL=http://mydomain.com/tracking.pl
 Is this a good idea?  I hope so, because I'm using it.

One problem with meta-refresh is that it breaks the browser back 
button.  After the refresh occurs and the new page is displayed, if 
the user hits the back button they wind up back at the meta-refresh 
page.  This can be confusing for users, especially with a short 
delay. (can be fun on April fools day, though)

Just read something about this on the web today, a couple days after 
using it myself.  ... 30 minutes later, after firing up ircd, going 
to the basement machine where I read the article, and pasting the 
link into an irc client to retrieve up here... here is the first link 
in a series on this topic:
http://www.w3.org/2001/06tips/reback

Mike
- -- 
Learn as if you will live forever, Live as if you will die tomorrow
Gandhi
http://www.bartley20.net
Key servers: http://www-math.uni-paderborn.de/pgp/extract.html
228E3CDB 2002/05/24 Mike Williams (no comment) [EMAIL PROTECTED]
Key fingerprint = F138 E5A8 F784 7F15 492C  8F9A B2EE E3EB 228E 3CDB



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE95AwMsu7j6yKOPNsRAhqiAKCqa2TQogtEhQwJ4psDf4NtwxZJFgCfRZbk
KDb8egtBLqw+Neijxp2S0QA=
=t+cf
-END PGP SIGNATURE-