mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
Closes #2249, enable Browser caching for js & css files in vendors
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5800 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
fa1901f539
commit
1674e9d936
1 changed files with 5 additions and 0 deletions
|
@ -628,7 +628,12 @@ class Dispatcher extends Object {
|
|||
|
||||
if (in_array($requestPath[0], array_keys($folders))) {
|
||||
if (file_exists(VENDORS . join(DS, $requestPath))) {
|
||||
$fileModified = filemtime(VENDORS . join(DS, $requestPath));
|
||||
header("Date: " . date("D, j M Y G:i:s ", $fileModified) . 'GMT');
|
||||
header('Content-type: ' . $folders[$requestPath[0]]);
|
||||
header("Expires: " . gmdate("D, j M Y H:i:s", time() + DAY) . " GMT");
|
||||
header("Cache-Control: cache");
|
||||
header("Pragma: cache");
|
||||
include (VENDORS . join(DS, $requestPath));
|
||||
exit();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue