title: Force no cache on webpage images with flask
body: <p>I have a page built with Flask that displays four images saved locally from another API I have written. From the webpage you can send commands to the API, which generates new images that overwrites and replaces the previous images at the same path. On some computers and browser, this works perfectly and on others the new images does not load to to caching. Since the whole point of the page is that it's dynamically changing all the time, it would not be an issue to disable caching all together, but I can't get it to work. I've tried putting the following code at the top of the HTML file but it still doesn't work, even when accessing it on a new browser and computer that never have visited the site.</p>
  <pre><code>{% extends 'base.html' %}
  &lt;meta http-equiv=&quot;Cache-Control&quot; content=&quot;no-cache, no-store, must-revalidate&quot;&gt;
  &lt;meta http-equiv=&quot;Pragma&quot; content=&quot;no-cache&quot;&gt;
  &lt;meta http-equiv=&quot;Expires&quot; content=&quot;0&quot;&gt;
  &lt;head&gt;
  ...
  </code></pre>
  <p>Since the API changes the images locally and I don't have them as a response, I can't add headers to the images and neither can I add a version/date to the url since I am using Flask's built in url_for and send_from_directory to get the images.</p>