Skip to content

Commit bfbd0ee

Browse files
Added style cache prevention
1 parent 79287a3 commit bfbd0ee

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎public/index.php‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ function str_ends_with($str, $end): bool
151151
}
152152

153153
$canonical = 'https://demos.setasign.com/' . trim($fullRequestPath, '/');
154+
$ts = function ($file) {return filectime($file);};
154155

155156
ob_start();
156157
echo <<<HTML
@@ -163,7 +164,7 @@ function str_ends_with($str, $end): bool
163164
<meta name="description" content="{$description}"/>
164165
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
165166
<link rel="stylesheet" type="text/css" href="./layout/normalize.css"/>
166-
<link rel="stylesheet" type="text/css" href="./layout/style.css?2"/>
167+
<link rel="stylesheet" type="text/css" href="./layout/style.css?t={$ts(__DIR__ . '/layout/style.css')}"/>
167168
<link rel="stylesheet" type="text/css" href="./js/codemirror-5.61.1/codemirror.css"/>
168169
<link rel="canonical" href="{$canonical}" />
169170
<link rel="icon" type="image/png" href="/images/favicon/favicon-96x96.png" sizes="96x96" />

0 commit comments

Comments
 (0)