diff --git a/view/Response.class.php b/view/Response.class.php index 10bb0b7b..2cee4c3e 100644 --- a/view/Response.class.php +++ b/view/Response.class.php @@ -169,6 +169,7 @@ class Response public static function enableHttpCache(int $seconds = 300) { static::addCacheControlHeader('max-age', $seconds); + static::setHeader('Pragma', 'public'); } public static function addCacheControlHeader(string $name, $value = null) @@ -248,6 +249,11 @@ class Response throw new LogicException('Headers have already been sent. They cannot be sent twice'); } + if (!static::getHeader(static::HEADER_CONTENT_TYPE)) + { + static::setHeader(static::HEADER_CONTENT_TYPE, 'text/html'); + } + $headers = static::getHeaders(); if (isset($headers[static::HEADER_STATUS]))