How to stop html network from downloading the same images?

Viewed 66

This is my game: https://colonist.io/

In the game there is the chat section, which show who has rolled what dice & gained what resource written in HTML.

enter image description here

So whenever a dice is rolled around 10 images are printed. Each of these images do a network call. I would normally expect the network call to not download the same image but for some reason it does and I can't find a way to make the browser use it from cache.

The response headers are set to: public, max-age=14400 The request headers are set to: cache-control: no-cache

So I am guessing the problem has got to do with the request headers but I couldn't find a way to change it.

How can I make it so that when I print a new HTML <img src="../dist/images/card_lumber.svg?v56"> it doesn't do an extra network call?

1 Answers

This is just a hunch, but make sure you've deselected the disable cache button in the network tab of the chrome developer tools.:

enter image description here

Related