perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cees Hek <c...@sitesuite.net>
Subject Re: Long waits on SQL Stored Procs. Should I use chained content handlers?
Date Thu, 05 Apr 2001 14:24:15 GMT

Since Apache can't respond to the request until the File has been uploaded
completely (at least this is what I understand, but I could be wrong), you
won't be able to do anything on the server side to handle this.

You could use what has been suggested by someone else (sorry, but I don't
remember who), and that is to have an onSubmit on the form that triggers
some JavaScript that pops up a layer overtop of the current page.  I don't
know enough about layers, but you might even be able to load a new page
into the layer while the form is being submitted.  When the upload is
completed, the entire document will be replaced with the response from the
server.

One issue that I see with this is, what happens if the upload fails, and
the connection is dropped...

Cees Hek


On Wed, 4 Apr 2001, Issac Goldstand wrote:

> Out of curiosity, what if the original page contains a form with an upload
> field?  Any suggestions/ideas on how to provide a similar strategy?  The
> problem with the scenario is that it's the upload that will probably take
> the most time...
>
> On Tue, 3 Apr 2001, Cees Hek wrote:
> 
> > On Mon, 2 Apr 2001 tls@860.org wrote:
> > 
> > > I need to run some stored procedures that take upwards of a minute to generate

> > > result sets. Ok, thats grand but I dont want the browser to sit there and 
> > > twiddle.
> > > 
> > > I'd like to display an animated gif. Simple. Right? I hope.
> > 
> > Why can't you just display your animated gif on a page with a refresh tag
> > that loads the real page with the query in it.  A refresh meta tag doesn't
> > have to reload the same page again, you can redirect it to another URL.  
> > Your gif would be displayed, and you query would start right away.  
> > 
> > You have to make sure that you don't send out any data from your query
> > script until you are ready to display the entire thing.  The browser will
> > not clear the screen until it receives some data from the server.
> > 
> > The only other issue here is browser timeouts.  If the page takes too long
> > to display, the browser may drop the connection, but I've found that if a
> > browser makes a connection, it will wait for a 'long' time for data to
> > show up.  I don't have any numbers, but it would be trivial to test.
> > 
> > This method is great to stop people from hitting a link repeatedly if a
> > page doesn't load right away.
> > 
> > I've included a simple HTML page that we use to generate some reports that
> > take up to 30 seconds to display
> > 
> > Cees Hek
> > 
> > 
> > <html>
> > <head>
> > <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> > <META HTTP-EQUIV="REFRESH" CONTENT="0; URL=reports.cgi?sessionid=?????">
> > </head>
> >  
> > <body marginheight="0" marginwidth="0" topmargin="0" leftmargin="0"
> > bgcolor="#FFFFFF">
> >  
> > <table width="100%" height="100%" border="0" cellspacing="0"
> > cellpadding="0" bgcolor="#FFFFFF" align=center>
> >  <tr>
> >   <td align="center" valign="center">
> >    <font face="verdana,arial,helvetica" size=4 color=red>
> >    Please wait while creating reports...</font>
> >   </td>
> >  </tr>
> > </table>
> > </body>
> > </html>
> > 
> 
> 
> 

-- 
Cees Hek
SiteSuite Corporation
cees@sitesuite.net


Mime
View raw message