Edward Posted August 22, 2012 Share Posted August 22, 2012 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 More sharing options...
Jaepee Posted August 22, 2012 Share Posted August 22, 2012 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 1 Link to comment Share on other sites More sharing options...
Edward Posted August 23, 2012 Author Share Posted August 23, 2012 Thanks this is one of the best posts I've seen here, caching which is important seems to be a neglected topic in today's php books. I see this appearing frequently in frameworks. Link to comment Share on other sites More sharing options...
Recommended Posts