<?xml version="1.0" encoding="ISO-8859-1"?>
<slide>
	<title>Squid</title>

	<blurb>Some effort to use with PHP:</blurb>
	<example><![CDATA[<?php
$timestamp = /* timestamp for last updated part */;
$tsstring = gmdate("D, d M Y H:i:s ", $timestamp)."GMT";

if ($_SERVER["HTTP_IF_MODIFIED_SINCE"] == $tsstring) {
    /* The UA has the exact same page we have. */
    header("HTTP/1.1 304 Not Modified");
    exit();
} else {
    header("Last-Modified: ".$tsstring);
}
?>]]></example>

	<break lines="2"/>
	<blurb>Set Cache-Control headers so external caches know how to respect your content:</blurb>
	<example><![CDATA[<?php
  header("Last-Modified: Mon, 13 Se4 2002 09:44:13 GMT");
  header("Expires: Mon, 13 Sep 2004 10:44:13 GMT");
  header("Cache-Control: must-revalidate, max-age=15, s-maxage=0, private");
?>]]></example>
</slide>
