When using the browser's back button on some of our pages we get a "Warning: Page has Expired" message. We are using Struts. Can anyone point us in a direction if this is Struts related or Browser related?
The browser in question is IE for sure, I have seen the likes of it before...
Are your pages marked for private cache control? Most dynamic pages set this mark via a meta tag. If a page is not cached, the browser will show the user the dreaded "page has expired" message and repost the form data and get the page only when the user refreshes the page manually.
If the pages are served via https, the browser may not cache them even if they are not marked for private cache control. You can change that by clearing the "Do not save encrypted pages to disk" option in Tools|Internet options|Advanced Properties.
We use IE. We have heard about this "meta tag" before but we don't know how to set it or how to change it. Any help is greatly appreciated.
Making the change in IE itself did not resolve the problem.
If *you* don't emit the meta tag, nobody else should. You can still check though.
Well, the first thing is to view the source for the page. There are different ways caching can be disabled, basically, you are looking for a <meta> tag where http-equiv attribute is "pragma", "cache-control" or "expires".
Caching can also be disabled via HTTP headers. It will be harder to check, as IE will not show the header information. You can develop a simple client to retrieve the headers from a URL and you're again looking out for "Pragma:", "Cache-control:" or "Expires:".
The strange thing with this "Page Expired" problem is that we do not have this problem with part of our application but run into this issue in other parts.
We are using "Wizards"-like pages. We don't get the warning in the first few steps of the wizard. When clicking the back-button in step 2, 3 or later of the wizard we get the "Page Expired" warning.