Simplify slideshow: load-on-demand, no preloading; add JS cache-busting

advanceSlide now sets src and waits for onload on the next slot directly —
no preloading, no transitionend, no setTimeout. Local files load in
milliseconds so preloading is unnecessary complexity that was causing
the slideshow to stall.

Also adds ?v=<mtime> cache-busting to the app.js script tag so Chromium
always picks up new JS after a deploy.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-09-03 13:03:50 +12:00
co-authored by Claude Sonnet 4.6
parent 47d41b4a61
commit d9f3a98286
3 changed files with 21 additions and 44 deletions
+3 -2
View File
@@ -20,8 +20,9 @@ joke_cache = {'data': None, 'timestamp': None}
@app.route('/')
def index():
"""Render the main display page."""
return render_template('index.html')
js_path = os.path.join(app.static_folder, 'js', 'app.js')
cache_bust = int(os.path.getmtime(js_path))
return render_template('index.html', cache_bust=cache_bust)
@app.route('/api/weather')