<blockquote>
<p dir="auto">Python 3.9.13<br>
Flask 2.2.2<br>
Werkzeug 2.2.2</p>
</blockquote>
<p dir="auto">The docs, in more than one place:</p>
<ul dir="auto">
<li><a href="https://flask.palletsprojects.com/en/2.2.x/quickstart/#debug-mode" rel="nofollow">https://flask.palletsprojects.com/en/2.2.x/quickstart/#debug-mode</a></li>
<li><a href="https://flask.palletsprojects.com/en/2.2.x/server/#command-line" rel="nofollow">https://flask.palletsprojects.com/en/2.2.x/server/#command-line</a></li>
</ul>
<p dir="auto">say to run <code class="notranslate">flask run --debug</code> but that doesn't actually work:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Usage: flask run [OPTIONS]
Try 'flask run --help' for help.

Error: No such option: --debug (Possible options: --debugger, --no-debugger)"><pre class="notranslate"><code class="notranslate">Usage: flask run [OPTIONS]
Try 'flask run --help' for help.

Error: No such option: --debug (Possible options: --debugger, --no-debugger)
</code></pre></div>
<p dir="auto">You need to run <code class="notranslate">flask --debug run </code></p>
<p dir="auto">In most other web frameworks static file caching would be disabled when the app is running in development mode. Since <code class="notranslate">FLASK_ENV</code> is something we have available to then maybe we can set <code class="notranslate">SEND_FILE_MAX_AGE_DEFAULT = 0</code> when we're in development mode. If <code class="notranslate">FLASK_ENV</code> isn't the correct variable to hook into maybe it could be set when <code class="notranslate">DEBUG</code> is set to true instead.</p>
<p dir="auto">I've seen this question pop up on IRC about 50 times in the last few years where someone wonders why after changing their CSS or JS in development they don't see the changes in their browser. The "fix" is to do a hard reload in your browser (CTRL+F5 on Windows / Linux) which forces browsers to serve an un-cached copy of the file.</p>
<p dir="auto">I know in my Flask course, this question has come up dozens of times as well until I mentioned setting this config value to 0.</p>
<p dir="auto">I can't think of a use case where you would want static file caching enabled in development and if you did you could always explicitly set the max age to whatever value you want.</p>
<p dir="auto">What do you think?</p>