Cache-bust app.js/style.css from index.html (?v=2)
index.html is no-store (always fresh) but app.js/style.css are cached max-age=300 in the browser — and possibly in the HTTPS proxy — so users kept seeing the pre-fix UI (episode names in buttons) long after the removal shipped. A versioned URL from the always-fresh index.html bypasses both caches. Bump ?v= on every app.js/style.css edit.
This commit is contained in:
1 parent
aeab72162e
commit
8840a883c0
1 file changed
+5
-2
+5
-2
@@ -6,7 +6,7 @@
|
|||||||
<title>ani-web</title>
|
<title>ani-web</title>
|
||||||
<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect width='64' height='64' rx='14' fill='%23f97316'/%3E%3Ctext x='32' y='45' font-family='sans-serif' font-size='42' font-weight='700' text-anchor='middle' fill='%230e0f13'%3Ea%3C/text%3E%3C/svg%3E">
|
<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect width='64' height='64' rx='14' fill='%23f97316'/%3E%3Ctext x='32' y='45' font-family='sans-serif' font-size='42' font-weight='700' text-anchor='middle' fill='%230e0f13'%3Ea%3C/text%3E%3C/svg%3E">
|
||||||
|
|
||||||
<link rel="stylesheet" href="style.css">
|
<link rel="stylesheet" href="style.css?v=2">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
@@ -26,7 +26,10 @@
|
|||||||
</header>
|
</header>
|
||||||
<main id="main"><p class="muted">Search for an anime to get started.</p></main>
|
<main id="main"><p class="muted">Search for an anime to get started.</p></main>
|
||||||
<div id="toasts" aria-live="polite"></div>
|
<div id="toasts" aria-live="polite"></div>
|
||||||
|
<!-- ponytail: bump ?v= whenever app.js/style.css change — they are cached
|
||||||
|
max-age=300 in browser AND possibly in your HTTPS proxy, and a stale
|
||||||
|
copy is exactly how users keep seeing an old UI after a deploy -->
|
||||||
<script src="hls.min.js"></script>
|
<script src="hls.min.js"></script>
|
||||||
<script src="app.js"></script>
|
<script src="app.js?v=2"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
Reference in new issue
Block a user