mirror of
https://github.com/openvk/chandler.git
synced 2025-01-22 15:24:15 +03:00
Add cache headers for static content
Reduces active connections requirement by instructing browsers not to revalidate ETags for a month
This commit is contained in:
parent
aa05e8135d
commit
68a9a05965
1 changed files with 1 additions and 0 deletions
|
@ -193,6 +193,7 @@ class Router
|
||||||
|
|
||||||
header("Content-Type: " . system_extension_mime_type($file) ?? "text/plain; charset=unknown-8bit");
|
header("Content-Type: " . system_extension_mime_type($file) ?? "text/plain; charset=unknown-8bit");
|
||||||
header("Content-Size: " . filesize($file));
|
header("Content-Size: " . filesize($file));
|
||||||
|
header("Cache-Control: public, must-understand, immutable, max-age=628000000");
|
||||||
header("ETag: $hash");
|
header("ETag: $hash");
|
||||||
|
|
||||||
readfile($file);
|
readfile($file);
|
||||||
|
|
Loading…
Reference in a new issue