mobile: cache-bust static assets so browser picks up CSS/JS edits
User reported phone still showing old behaviour (Qty/Avg portfolio
columns visible) even though the server-side JS had been updated.
Root cause: every <link>/<script> URL was a plain
/static/css/foo.css with no query string, so mobile Chrome served
the file from its HTTP cache rather than refetching it.
Adds a process-startup timestamp to the Jinja environment as
ASSET_VERSION (computed once when templates_env is imported). Every
<link>/<script> reference now appends `?v={{ ASSET_VERSION }}` so a
container restart bumps the URL and the browser refetches. 38 URLs
across 8 templates updated via sed; tests still pass.
Side benefit: future CSS/JS edits no longer require users to hard-
refresh.
This commit is contained in:
parent
1a20f0a15b
commit
daa3f79a52
9 changed files with 47 additions and 38 deletions
|
|
@ -10,9 +10,9 @@
|
|||
catch (e) { document.documentElement.dataset.theme = 'light'; }
|
||||
})();
|
||||
</script>
|
||||
<link rel="stylesheet" href="{{ url_for('static', path='/css/tokens.css') }}" />
|
||||
<link rel="stylesheet" href="{{ url_for('static', path='/css/layout.css') }}" />
|
||||
<link rel="stylesheet" href="{{ url_for('static', path='/css/auth.css') }}" />
|
||||
<link rel="stylesheet" href="{{ url_for('static', path='/css/tokens.css') }}?v={{ ASSET_VERSION }}" />
|
||||
<link rel="stylesheet" href="{{ url_for('static', path='/css/layout.css') }}?v={{ ASSET_VERSION }}" />
|
||||
<link rel="stylesheet" href="{{ url_for('static', path='/css/auth.css') }}?v={{ ASSET_VERSION }}" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="auth-shell">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue