Jump to content
Larry Ullman's Book Forums

Document Expired


Recommended Posts

When i was logged into Knowledge is Power as Admin, i clicked "Add Page" in the administration section, then add_page.php section is loaded.

 

Then i entered some sample data which did not meet full validation.

 

I then clicked on the browser back button which reset the form data, then clicked on the browser forward button, which brought me to this error:

 

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Document Expired

 

This document is no longer available.

 

The requested document is not available in Firefox's cache.

As a security precaution, Firefox does not automatically re-request sensitive documents.

Click Try Again to re-request the document from the website.

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

So what does this mean? How can this error be prevented? Is this something that frameworks like Yii handle automatically?

Link to comment
Share on other sites

Hi Edward I had a similar error message with a search script I made(e.g. clicking the back button). The following code fixed my problem.

 


// call this before session_start(); // 
session_cache_limiter ('private, must-revalidate');
$cache_limiter = session_cache_limiter();
//
session_cache_expire(60); // 60 minutes

 

I beleive it keeps the form data from the headers stored in the server cache for 60 minutes.

 

jp

  • Upvote 1
Link to comment
Share on other sites

 Share

×
×
  • Create New...