title: GET request returns old version of an image in Flask
body: <p>I'm trying to retrieve an image to a html page with GET request like this:</p>
  
  <pre><code>let img = new Image();
  img.onload = function () { ... };
  img.src = 'http://localhost:5000/img';
  </code></pre>
  
  <p>and it works great on the first time when you start the server, but when I try to do this again, it returns the previous image.</p>
  
  <p>My Flask part of '/img' looks like this:</p>
  
  <pre><code>@app.route('/img')
  def get_img():
      return send_from_directory('./tmp', 'result.png')
  </code></pre>
  
  <p>I made sure that the result.png on my computer is being updated, and it is. When I try to manually access '<a href="http://localhost:5000/img" rel="nofollow noreferrer">http://localhost:5000/img</a>', it retrieves the old image, that I've already overwritten. When I refresh '<a href="http://localhost:5000/img" rel="nofollow noreferrer">http://localhost:5000/img</a>', it returns the updated image that's on my computer at the moment.</p>
  
  <p>This probably has nothing to do with Flask, but instead with my lacking knowledge of how HTTP works, and I'd really appreciate if someone could help me out on this one. Thanks.</p>