diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-01-11 15:32:07 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-01-11 15:32:07 +0100 |
| commit | 7e5d9e75270d083cb2bc69bed07bb6b492e65d82 (patch) | |
| tree | 85dd2c1ddbaef88537a410aaa6bd0ca81b67f100 /public | |
| parent | df2c5edd7ac0e89d3ab2e83f1890f5af048cd94d (diff) | |
cache-bust css
Diffstat (limited to 'public')
| -rw-r--r-- | public/index.html | 8 |
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> |
