Skip to content

Commit 63d4e65

Browse files
authored
[4.0] Cache-Control post-check and pre-check (#36391)
* [4.0] Cache-Control post-check and pre-check This PR (and the associated pr in the framework) kills the references to post-check and pre-check from the headers. These are non-standard directives introduced in ie5 and killed in ie7 and do nothing today except wasting bytes and bandwidth. Ref: https://www.fastly.com/blog/cache-control-wild * Update CMSApplication.php oops
1 parent a444e83 commit 63d4e65

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

libraries/src/Application/CMSApplication.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1095,7 +1095,7 @@ protected function route()
10951095

10961096
$this->setHeader('Expires', 'Wed, 17 Aug 2005 00:00:00 GMT', true);
10971097
$this->setHeader('Last-Modified', gmdate('D, d M Y H:i:s') . ' GMT', true);
1098-
$this->setHeader('Cache-Control', 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0', false);
1098+
$this->setHeader('Cache-Control', 'no-store, no-cache, must-revalidate', false);
10991099
$this->sendHeaders();
11001100

11011101
$this->redirect((string) $oldUri, 301);

plugins/system/languagefilter/languagefilter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ public function parseRule(&$router, &$uri)
481481
// We cannot cache this redirect in browser. 301 is cacheable by default so we need to force to not cache it in browsers.
482482
$this->app->setHeader('Expires', 'Wed, 17 Aug 2005 00:00:00 GMT', true);
483483
$this->app->setHeader('Last-Modified', gmdate('D, d M Y H:i:s') . ' GMT', true);
484-
$this->app->setHeader('Cache-Control', 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0', false);
484+
$this->app->setHeader('Cache-Control', 'no-store, no-cache, must-revalidate', false);
485485
$this->app->sendHeaders();
486486
}
487487

0 commit comments

Comments
 (0)