false)); } $requested_time=(isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])) ? strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) : time(); if($last_modified === $requested_time) { header("HTTP/1.1 304 Not Modified"); exit(); } header("Content-Type: application/x-javascript; charset=utf8"); header("Cache-control: public, max-age=691200, must-revalidate"); header("Last-Modified: ".gmdate('D, d M Y H:i:s', $last_modified)." GMT"); header("Expires: ".gmdate('D, d M Y H:i:s', (filemtime($base_path.'js.php') + 691200))." GMT"); echo $js; ob_end_flush(); //end of js.php