Why does my Flask app not render CSS if I don't clear my cache?
问题 I've been using Flask and have linked the html I'm rendering to a css stylesheet. I've noticed that whenever I update my CSS code, I have to clear the cache in order to get it to update on the webpage. How can I fix this? 回答1: I assume you are loading your CSS files with something like: {{ url_for('static', filename='some/file.css') }} For this to refresh immediately in development, you should set the following config var to -1 : app.config['SEND_FILE_MAX_AGE_DEFAULT'] = -1 As @Matvei states,