diff --git a/app.py b/app.py index 1c13944..0cd42bc 100644 --- a/app.py +++ b/app.py @@ -33,16 +33,14 @@ item6 = 0 app.logger.info('Starting erdbeerhannah v' + version) # prevent cached responses +# https://stackoverflow.com/questions/47376744/how-to-prevent-cached-response-flask-server-using-chrome @app.after_request def add_header(r): """ Add headers to both force latest IE rendering engine or Chrome Frame, and also to cache the rendered page for 10 minutes. """ - r.headers["Cache-Control"] = "no-cache, no-store, must-revalidate" - r.headers["Pragma"] = "no-cache" - r.headers["Expires"] = "0" - r.headers['Cache-Control'] = 'public, max-age=0' + r.headers["Cache-Control"] = "no-store, max-age=0" return r @app.route("/", methods=["GET", "POST"])