It's not a secret anymore!*
The moose likes JSP and the fly likes Page expires by itself Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Page expires by itself" Watch "Page expires by itself" New topic
Author

Page expires by itself

Gavi Raaghav
Ranch Hand

Joined: Apr 28, 2005
Posts: 82
Whenever the user hits the browser back button the jsp page expires and needs to be refreshed in order to get the data.
I am not using any measure(response.setHeader) to expire the page explicitly.I am using Struts and Websphere5.1 and IE 6.0

Is there any setting in WAS which needs to be configured in order to avoid this?
Scott Johnson
Ranch Hand

Joined: Aug 24, 2005
Posts: 518
IE may have decided not to cache the page on it's own.

Is the url http or https?

If it is https, IE may have chosen not to cache it for security purposes.

Try switching to http and see if you have the same issue. (I don't recommend this as a solution, but it will help determine if that's the situation.)

In general, I think it's bad design to require a user to use the back button to navigate a web site. There should be a "back" link if a user needs to return to the previous page.
Gavi Raaghav
Ranch Hand

Joined: Apr 28, 2005
Posts: 82
I am using http and since its just data capture windows the users are more comfortable hitting the browser back button.
if it is a property of the browser then shudnt every website behave in the same way but it dosen't.
Darren Edwards
Ranch Hand

Joined: Aug 17, 2005
Posts: 69
Assuming your users are using IE, that is its default behaviour when clicking the back button after performing a POST. As a general rule POSTs should only be used for actions which modify data. If your action is modifying data you should consider redirecting straight after - just like happens on these forums when a post is made. http://www.theserverside.com/tt/articles/article.tss?l=RedirectAfterPost
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
Originally posted by Darren Edwards:
Assuming your users are using IE, that is its default behaviour when clicking the back button after performing a POST. As a general rule POSTs should only be used for actions which modify data. If your action is modifying data you should consider redirecting straight after - just like happens on these forums when a post is made. http://www.theserverside.com/tt/articles/article.tss?l=RedirectAfterPost


Right.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Page expires by itself