Firefox not caching images with a query string

I’m a bit confused as to how caching works in phoenix.

I deployed to production but every time I refresh the page all my images are being reloaded.

I thought this was supposed to just work, do I need to set this up some how?

My urls look like this “images/hero-w720-2db9f89ab70d837a73bed5ff7d048813.png?vsn=d”

shouldn’t the browser be caching this if it doesn’t change?

In case it is important i’m also using a heroku buildpack to deploy to a dokku server.

edit

Seems to be a firefox issue, in chrome it says (memory cache) in the size column of the network tab, however firefox keeps downloading the whole image every time…

On further investigation it seems firefox won’t cache any image with a query string, i can see the same issue of images not being cached in firefox on other sites using phoenix such as phoenixframework.org. Is this a known issue?

There are many reasons why a certain resource might or might not be cached by a browser.
To get more information about what is happening, I suggest looking in the browser’s inspector/developer tools (Ctrl + Shift + ‘I’ on both Chrome and Firefox), to be precise in the ‘network’ tab, and see what happens when reloading the page.