| … | … | @@ -312,7 +312,15 @@ def stats_headers(resp, h, lo, hi, extra=None): |
| 312 | 312 | # --------------------------------------------------------------------------- |
| 313 | 313 | @app.get("/") |
| 314 | 314 | def index(): |
| 315 | | return send_from_directory(HERE, "index.html") |
| 315 | # The page is edited constantly during a session, and a cached copy is not a |
| 316 | # cosmetic problem: an older index.html kept sending the seed field on every |
| 317 | # request, so the browser silently drove the world to a different seed while |
| 318 | # the server was verifiably on 1234. Cost an hour of chasing a model bug that |
| 319 | # did not exist. Never let this file cache. |
| 320 | r = send_from_directory(HERE, "index.html") |
| 321 | r.headers["Cache-Control"] = "no-store, no-cache, must-revalidate, max-age=0" |
| 322 | r.headers["Pragma"] = "no-cache" |
| 323 | return r |
| 316 | 324 | |
| 317 | 325 | |
| 318 | 326 | @app.get("/api/erosion.png") |