Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP Document Expired

Tags:

I doing some PHP coding, if the 'Back' button is pressed on the browser, I get the following error:

Document Expired This document is no longer available. 

What code can I implement to cater to this situation

like image 362
user1383147 Avatar asked May 29 '12 08:05

user1383147


2 Answers

Add this in the start of PHP codes:

ini_set('session.cache_limiter','public'); session_cache_limiter(false); 
like image 134
T.Todua Avatar answered Sep 25 '22 10:09

T.Todua


Set Cache-Control header in your main page.

<?php header('Cache-Control: max-age=900'); ?> 
like image 25
Sanjeev Chauhan Avatar answered Sep 24 '22 10:09

Sanjeev Chauhan