File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Page expires by itself

 
Gavi Raaghav
Ranch Hand
Posts: 82
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 518
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 82
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 69
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2874
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic