1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-23 22:52:51 +02:00

Use file caching only in non-dev

This commit is contained in:
Jakub Vrana
2018-02-20 22:08:52 +01:00
parent 8bb51bec36
commit 6ebbd8c719
2 changed files with 17 additions and 10 deletions

View File

@@ -1,13 +1,5 @@
<?php
//! rewrite in compile.php to cache moderately with -dev version
if ($_SERVER["HTTP_IF_MODIFIED_SINCE"]) {
header("HTTP/1.1 304 Not Modified");
exit;
}
header("Expires: " . gmdate("D, d M Y H:i:s", time() + 365*24*60*60) . " GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: immutable");
// caching headers added in compile.php
if ($_GET["file"] == "favicon.ico") {
header("Content-Type: image/x-icon");