You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Thane Eisener <th...@nortelnetworks.com> on 2001/06/07 16:43:04 UTC

RE: Can anyone help with solving the "BACK" button problem, in th e browser?

I seem to recall a META tag called something like pragma-no-cache that you
can embed in your page which will force the page to reload (not just display
a snapshot). This should enable handling the situation in scriptlets or your
action class.


-----Original Message-----
From: Peter Alfors [mailto:peter.alfors@irista.com]
Sent: Thursday, June 07, 2001 9:52 AM
To: struts-user@jakarta.apache.org
Subject: Re: Can anyone help with solving the "BACK" button problem, in
the browser?


Depending on which browser you use, and the data on the page, the back
button
may cause (or ask) the page to reload.
However, some browsers (like IE) only display a snapshot of what the last
page
rendered to.
Therefore, you cannot use scriptlets or the action class.  However, you are
able
to kick-off javascript.
If you can gaurantee that your users will have javascript enabled, you can
write
a simple test to see if this page was already displayed to the user.  You
could
check a flag (hidden field) when the page loads.  If the flag is true, then
use
the javascript to reload to your desired page.

HTH,
    Pete

"Dudley Butt@i-Commerce" wrote:

> Please help,
>
> When the user pushes the back button, I want the page to redirect or
refresh
> to a different page, please, any ideas?
>
> Thanx guys and gals
> Dudley

Re: Can anyone help with solving the "BACK" button problem, in th e browser?

Posted by Peter Alfors <pe...@irista.com>.
Thane ,

I am using:
    <META http-equiv="Expires" content="now">
in my header, and my action is not re-executed when I use the browser
back button.
Is there another option I should be using?

thanks,
    Pete


Thane Eisener wrote:

>
>
> I seem to recall a META tag called something like pragma-no-cache that
> you can embed in your page which will force the page to reload (not
> just display a snapshot). This should enable handling the situation in
> scriptlets or your action class.
>
> -----Original Message-----
> From: Peter Alfors [mailto:peter.alfors@irista.com]
> Sent: Thursday, June 07, 2001 9:52 AM
> To: struts-user@jakarta.apache.org
> Subject: Re: Can anyone help with solving the "BACK" button problem,
> in
> the browser?
>
> Depending on which browser you use, and the data on the page, the back
> button
> may cause (or ask) the page to reload.
> However, some browsers (like IE) only display a snapshot of what the
> last page
> rendered to.
> Therefore, you cannot use scriptlets or the action class.  However,
> you are able
> to kick-off javascript.
> If you can gaurantee that your users will have javascript enabled, you
> can write
> a simple test to see if this page was already displayed to the user.
> You could
> check a flag (hidden field) when the page loads.  If the flag is true,
> then use
> the javascript to reload to your desired page.
>
> HTH,
>     Pete
>
> "Dudley Butt@i-Commerce" wrote:
>
> > Please help,
> >
> > When the user pushes the back button, I want the page to redirect or
> refresh
> > to a different page, please, any ideas?
> >
> > Thanx guys and gals
> > Dudley