Cache-bust app.js/styles.css with ?v=2; document deploy flow
This commit is contained in:
10
README.md
10
README.md
@@ -28,6 +28,16 @@ To use another port: `PORT=8080 python3 server.py`.
|
|||||||
- **Edit / delete** — every entry can be changed or removed.
|
- **Edit / delete** — every entry can be changed or removed.
|
||||||
- **Sample data** — realistic entries are loaded on first run so each view has content. Use **Clear all** to start empty and **Load sample data** to add them back.
|
- **Sample data** — realistic entries are loaded on first run so each view has content. Use **Clear all** to start empty and **Load sample data** to add them back.
|
||||||
|
|
||||||
|
## Deploy
|
||||||
|
|
||||||
|
Live at **https://tally.shaebali.com** (Dokploy app `tally`, built from the
|
||||||
|
`main` branch of the `shaebali/tally` Gitea repo). To ship: commit, push to
|
||||||
|
`main`, then trigger `application.deploy` on Dokploy.
|
||||||
|
|
||||||
|
Cloudflare caches `app.js`/`styles.css` at the edge, so every deploy that
|
||||||
|
changes them must bump the `?v=` query in `index.html` or visitors keep
|
||||||
|
getting the old files until the edge entry expires.
|
||||||
|
|
||||||
## Files
|
## Files
|
||||||
|
|
||||||
- `index.html` — page structure
|
- `index.html` — page structure
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Petit+Formal+Script&family=Shadows+Into+Light+Two&family=Style+Script&family=Waterfall&display=swap" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css2?family=Petit+Formal+Script&family=Shadows+Into+Light+Two&family=Style+Script&family=Waterfall&display=swap" rel="stylesheet">
|
||||||
<link rel="stylesheet" href="styles.css">
|
<link rel="stylesheet" href="styles.css?v=2">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header class="topbar-mini">
|
<header class="topbar-mini">
|
||||||
@@ -164,6 +164,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="app.js"></script>
|
<script src="app.js?v=2"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user