summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2020-01-11 15:32:07 +0100
committerJules Laplace <julescarbon@gmail.com>2020-01-11 15:32:07 +0100
commit7e5d9e75270d083cb2bc69bed07bb6b492e65d82 (patch)
tree85dd2c1ddbaef88537a410aaa6bd0ca81b67f100 /public
parentdf2c5edd7ac0e89d3ab2e83f1890f5af048cd94d (diff)
cache-bust css
Diffstat (limited to 'public')
-rw-r--r--public/index.html8
1 files changed, 7 insertions, 1 deletions
diff --git a/public/index.html b/public/index.html
index 1a2d81c..d1cb6f8 100644
--- a/public/index.html
+++ b/public/index.html
@@ -7,7 +7,13 @@
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width, initial-scale=1.0, user-scalable=yes' />
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
- <link rel='stylesheet' href='/assets/css/css.css'>
+ <script>
+ var s = document.createElement('link');
+ var a = window.location.href.match('localhost') ? Date.now() : (Math.round(Date.now() / 3600000) * 3600000)
+ s.setAttribute('rel', 'stylesheet');
+ s.setAttribute('href', '/assets/css/css.css?' + a);
+ document.querySelector('head').appendChild(s)
+ </script>
</head>
<body>