[Zope] Telling Users to Wait
Martijn Pieters
mj@zope.com
Tue, 20 Nov 2001 13:37:45 -0500
On Tue, Nov 20, 2001 at 12:19:14PM -0500, Edmund Goppelt wrote:
> On Mon, Nov 19, 2001 at 04:07:59PM -0500, Martijn Pieters wrote:
> > A better way is to use the HTTP Refresh header. Remove the Javascript from
> > the above example, and add:
> >
> > <dtml-call "REQUEST.addHeader('Refresh',
> > '0;URL=http://server/slow_page')">
>
> This is a sweet solution (I'm guessing you meant to write
> "RESPONSE.addHeader...") The only thing I don't like about it is that
> the user cannot use his browser's back button without becoming
> "trapped". When he hits the back button, the "please wait" page is
> loaded which immediately redirects him to the page he was just on
> (i.e. the slow page). Is there some way to remove the "please wait"
> page from the Browser's history list so that the Back button works as
> expected?
Only with javascript, and then only with browsers that support the
extension (for which you can test). You can use window.location.replace() to
replace the current URL with another, which causes the currentl url to be
removed from the hbrowser history.
--
Martijn Pieters
| Software Engineer mailto:mj@zope.com
| Zope Corporation http://www.zope.com/
| Creators of Zope http://www.zope.org/
---------------------------------------------