From: Alexander Ebert Date: Sat, 21 Dec 2013 14:27:43 +0000 (+0100) Subject: Sending "Cache-Control: no-store" for Firefox X-Git-Tag: 2.0.1~26^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4753d38e324680b4adfdcb79a64338203653b538;p=GitHub%2FWoltLab%2FWCF.git Sending "Cache-Control: no-store" for Firefox --- diff --git a/wcfsetup/install/files/lib/util/HeaderUtil.class.php b/wcfsetup/install/files/lib/util/HeaderUtil.class.php index 57b6f0d027..f79c895507 100644 --- a/wcfsetup/install/files/lib/util/HeaderUtil.class.php +++ b/wcfsetup/install/files/lib/util/HeaderUtil.class.php @@ -49,6 +49,10 @@ final class HeaderUtil { if (HTTP_ENABLE_NO_CACHE_HEADERS && !WCF::getSession()->spiderID) { self::sendNoCacheHeaders(); } + else if (!empty($_SERVER['HTTP_USER_AGENT']) && strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox') !== false) { + // Firefox serves pages from cache, causing certain HTML elements to stay in an outdated state + @header('Cache-Control: no-store'); + } if (HTTP_ENABLE_GZIP && HTTP_GZIP_LEVEL > 0 && HTTP_GZIP_LEVEL < 10 && !defined('HTTP_DISABLE_GZIP')) { if (function_exists('gzcompress') && !@ini_get('zlib.output_compression') && !@ini_get('output_handler') && isset($_SERVER['HTTP_ACCEPT_ENCODING']) && strstr($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) {