Networking, Programming and Graphics Tutorials

How to send headers to user's browser with PHP [2/3]

For sending 'missing page' header try this:

<?php
header
("HTTP/1.0 404 Not Found");
?>
PHP scripts often generate dynamic content that must not be cached by the client browser or any proxy caches between the server and the client browser. Many proxies and clients can be forced to disable caching with:

<?php
header
("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
?> 
Networking, Programming and Graphics Tutorials - How to send headers to user's browser with PHP [2/3] - Networking, Programming and Graphics Tutorials
RECOMMENDED TUTORIALS

Need a specific tutorial? Do not hesitate and submit a request!
Related Tags: