What is the purpose of caching in the header below? I used
something like this for downloading a detail page to Excel but in this
example it looks like it is for cache control? Why would you expire a
header? So the user couldn't send a request after too long of a period
for example in the downloaded excel page?
<?php
header("Expires : Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the
past
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
// always
modified
header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/
1.1
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache"); // HTTP/1.0
?>
Also, what is the status header for or rather how does it work? You
can get some status information from the server? Is this sent in
conjunction with a header request? What is not found the page or the
server?
header(“Status: 404 Not Found”);
thanks,
something like this for downloading a detail page to Excel but in this
example it looks like it is for cache control? Why would you expire a
header? So the user couldn't send a request after too long of a period
for example in the downloaded excel page?
<?php
header("Expires : Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the
past
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
// always
modified
header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/
1.1
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache"); // HTTP/1.0
?>
Also, what is the status header for or rather how does it work? You
can get some status information from the server? Is this sent in
conjunction with a header request? What is not found the page or the
server?
header(“Status: 404 Not Found”);
thanks,
Comment