vendredi 20 juillet 2018

Flask cached files, no new changes applied (still loads old .css and .js files)

I have simple flask application running on flask development server on Debian9. Everything worked fine until today. Now, when I change any of the files in static directory, the browser loads the old file and no change is displayed. 2 browsers tried: Chrome and IE.

I've tried this:

  1. Clear all browser cache, refresh page = no effect
  2. Install 2 brand new browsers (Vivaldi and Opera) = On the first time the URL was entered, old .css files were loaded
  3. When I rename the .css file and accordingly modify the html, the changes are applied and everything looks fine until I make another change, then I have to rename it again.

I run flask app with flask run --host='0.0.0.0' --port='80'

I found many similar posts, everytime they were solved by clearing browser cache, or adding @app.after_request decorator, but it did'nt help in this case. I don't think this is browser cache related. Thank you for any advices.




Aucun commentaire:

Enregistrer un commentaire