public static function sendHeaders() { if (self::$_headersSent) { //throw new Exception('headers already sent'); return; } if (self::$_lastModified !== null) { header('Last-Modified: ' . gmdate("D, d M Y H:i:s T", self::$_lastModified)); //header('X-Last-Modified: '.gmdate("D, d M Y H:i:s T", self::$_lastModified)); $ifModifiedSince = request::getHttpHeader('If-Modified-Since', false); if ($ifModifiedSince) { if ($ifModifiedSince == gmdate('D, d M Y H:i:s T', self::$_lastModified)) { self::notModified(); } } } self::$_headersSent = true; }