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:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user