diff --git a/adminer/include/adminer.inc.php b/adminer/include/adminer.inc.php
index 011ed46a..59674b34 100644
--- a/adminer/include/adminer.inc.php
+++ b/adminer/include/adminer.inc.php
@@ -1038,18 +1038,26 @@ class Adminer {
*/
function navigation($missing) {
global $VERSION, $jush, $drivers, $connection;
- ?>
+?>
+
+
time()) { // 86400 - 1 day in seconds
+ if (!$_COOKIE["adminer_version"] && file_exists($filename) && ($lifetime = filemtime($filename) + 86400 - time()) > 0) { // 86400 - 1 day in seconds
$data = unserialize(file_get_contents($filename));
+
$_COOKIE["adminer_version"] = $data["version"];
- cookie("adminer_version", $data["version"], 24 * 3600);
+ cookie("adminer_version", $data["version"], $lifetime); // Sync expiration with the file.
}
?>
@@ -42,12 +43,12 @@ function page_header($title, $error = "", $breadcrumb = [], $title2 = "") {