Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When I submit a form and then press back, I sometimes get the message "Document expired" instead of the last page.

enter image description here

I used to get the following annoying message box instead (which now appears after a click on "Try Again"):

enter image description here

Now, I do know what this means and why Firefox shows this message. However, I want to just see the last viewed page instead - just as it was displayed a second ago. No popup, and no reloading to reflect the server's new state. (Maybe a little info bar would be nice, but it's not neccessary for me).

Use case: Imagine I logged in to a site I regularly use, and after pressing Enter I see in the corner of my eye a news headline on the login page. I'd like to click back and see the exact page I saw a second ago to click on the headline. If I view the front page logged in, or just reload it, I might get different (randomized) headlines.

So how do I get rid of the "Document expired" and "Confirm" messages completely and get Firefox to simply display the cached last location after submitting a POST form? about:config settings, extensions, proxy tricks are all fine.

share|improve this question
You 're asking how to display the cache entry of a non cached document. It's not possible. –  paa Apr 17 '13 at 20:26
Well, then by extension I'm asking how to make Firefox also cache the document :-). –  jdm Apr 18 '13 at 6:51
I encounter this a lot when all I'm trying to do is to backup through browsing history to get to somewhere before the problem occurred. Having something to get past this roadblock would be very useful. I know I can use the History button on the main toolbar, but it's often hard to figure out which entry to choose. –  Joe Apr 23 '13 at 22:18
@jdm you're asking 1) how to display the page I've navigated away in the same manner I've seen it before; 2) and how to get rid of browser's confirmation box to resend the data. Did I understand that clearly? –  laika May 10 '13 at 14:17
@sjrco: 1) yes, but not 2). I'd like to be able to click back and see what was there (same page state) before I navigated away. (That works on some pages even though they have been modified by js, or the user filled out forms, so the browser must save the modified document under some circumstances). I don't want the browser to silently resend data. I do want to suppress modal dialogs when it doesn't resend data, though. –  jdm May 10 '13 at 17:35
show 1 more comment

2 Answers 2

The Firefox engine does not (or should not) cache the last state of documents, only the HTML document itself if the server allows caching. Opera had (or maybe still has) this feature, but it has caused many security headaches for website operators.

RFC 2616 states:

13.4 Response Cacheability

Unless specifically constrained by a cache-control (section 14.9) directive, a caching system MAY always store a successful response (see section 13.8) as a cache entry, MAY return it without validation if it is fresh, and MAY return it after successful validation.

A lot of sites nowadays employ the cache-control header on all responses generated by the server to avoid caching problems. Even if you get Firefox to give you the document in the former state, on the majority of sites if wouldn't or shouldn't work anyway. The safest and most future-proof solution would be to ask the website owner to code their website properly.

share|improve this answer
But it does cache the last state, at least in some circumstances. Try this: gist.github.com/jdmansour/5578079 . At least the DOM is preserved. –  jdm May 14 '13 at 18:05
History and cache are not the same thing. See section 13.13 of the same RFC. The back button requests a redisplay of a history entry, not a cache entry. Opera is right; Firefox is wrong. Anyone who claims this is a "security" feature is being stupid. You can always use "open in new tab", then close the new tab to see the previous page without the server knowing that you have done so. A properly functioning back button should have exactly that effect. –  Wumpus Q. Wumbley Aug 17 '13 at 21:15
add comment

I have also same problem.The root cause for this problem is due to server domain name. Try to change your domain name else access your application by using ipAddress.

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.