title: Google Chrome is not caching images
body: <p>I'm trying to optimize my application in Ruby on Rails, and I realized that the pictures in my application is what most long does it take to load, but I also noticed another problem, which is that google chrome isn't caching the images.</p>
  
  <p>I noted this because in the Google Developers Console you can see that Google Chrome makes a request to load the images that are canceled before the images are truly loaded.</p>
  
  <p>This can be seen here, first I open the Google Developers Console, then refresh the page and within the first requests there you can see the ones of the images, but they are canceled immediately.</p>
  
  <p><a href="https://i.stack.imgur.com/SvGoA.png" rel="noreferrer"><img src="https://i.stack.imgur.com/SvGoA.png" alt="google_not_caching"></a></p>
  
  <p>After that you can see the requests that actually loaded the images.</p>
  
  <p><a href="https://i.stack.imgur.com/7SvP1.png" rel="noreferrer"><img src="https://i.stack.imgur.com/7SvP1.png" alt="enter image description here"></a></p>
  
  <p>I don't understand why is this happening if in the response headers you can see that the <code>Cache Control</code> is set to <code>public</code> with <code>max-age = 31536...</code></p>
  
  <p><a href="https://i.stack.imgur.com/TYj4j.png" rel="noreferrer"><img src="https://i.stack.imgur.com/TYj4j.png" alt="response_header"></a></p>
  
  <p>I put the images in my application this way: </p>
  
  <pre><code>&lt;div class="col-xs-3"&gt;&lt;%= image_tag "#{@hero.id}/ability_1.png", class: "center-block"%&gt;&lt;/div&gt;
  </code></pre>
  
  <p>And the images are organized in folders in <code>app/assets/images</code></p>
  
  <p>Is there a RoR way to fix this?</p>
  
  <p><strong>Edit</strong>: Now testing my app (which is in Heroku) in Windows I noticed that in fact Google Chrome caches the images sometimes, but it happens like the 50% of the times (and when I was in Ubuntu in development it didn't work a single time), while in firefox the first time the images are loaded, but the subsequent times I load the same view I can't even notice the reload, it's beatiful, Why google Chrome is not like that? Is normal that Google Chrome acts so weird?</p>