I have a stylesheet that's generated dynamically using PHP (based on database settings).
So in the html, I have
<link href="/includes/style.php" rel="stylesheet" type="text/css">
I want the stylesheet to only be cached for a certain amount of time (like 20 minutes) - so if the admin changes the settings, the website user's will see those changes next time they log in. In order to do so, I set some header values. I tested it out using 3 minutes, but it doesn't seem to reload the stylesheet after 3 minutes. The problem might be that "Expires" header uses GMT and my machine is in the EST time zone
Here's the top of the PHP code for the dynamic style sheet.
<?php
session_start();
header("Content-type: text/css");
header("Cache-Control: must-revalidate");
$offset = 3 * 60; // 3 minutes
$ExpStr = "Expires: " .
gmdate("D, d M Y H:i:s", time() + $offset) . " GMT";
header($ExpStr);
-- On the w3.org website, I found that all HTTP dates must be specified in GMT, so I'm thinking that maybe I need to convert my time() value to GMT (or is it already in GMT).
Thanks for any suggestions