Hello,
I noticed that when using the 1.57.1 engine to build my project, I had loading/caching issues. These issues do not occur when building with 1.56.0.
It happens both when checking the “preload” toggle on the assets, or by preloading the assets through script.
Here are two screencap of my “network” tab when launching my game. Top one is on 1.56.0, bottom one on 1.57.1.
On 1.56.0, everything is fine, the thumbnails are preloaded (that’s the first batch of GET requests), then when they’re needed in-game, the browser uses the cached thumbnails.
Now the same thing on 1.57.1:
As you can see the browser actually performs a new request for each thumbnail, rendering the preloading useless. As you can imagine this results in texture popping up a bit late when playing the game.
It seems like the browser can’t make the link between the preloaded asset and the asset requested in-game. I wonder if this can be related to the fact that on 1.56.0, the preload request type is (img), but on 1.57.1 it is (xhr) ?
It happens on firefox and chrome both desktop and android
Thanks for you help,
I can’t share the project unfortunately.
There is something that I did not mention though because I thought it was irrelevant, but your comment makes me think it might be a clue.
We’re using lots of HTML overlays on top of our games. To make these overlays, we’re doing it like this :
Could you share a new, small project repro of the issue though?
Could be related and would need to do a small test to confirm. When you have an HTML overlay, it’s using an Image DOM element so perhaps the browser is treating this as a different request and processes the image different.
I would like to think that the browser can handle this as it’s the same URL but perhaps it’s some deliberate behaviour from the browser.