Img resources loading
Posted: 22 April 2020, 21:53
Hi there
Once again i am asking for your lights.
I develop a car race games with dozens of track.
Each track is described in a php file located in modules (dozens files in modules prefixed with RGT).
Each track has also a background image located in img width a size of 2Mo each.
My idea was that the user load only 1 track per game. But i see in the network tab of chrome that all my track images are downloaded for each game. Even those that are not required. I have no link to this image neither in php, js or css. It is all made programatically at runtime.
I do not know if this behavior is for development time only.
My question is : How can i prevent downloading of the unused images?
Thank you again for your time
Once again i am asking for your lights.
I develop a car race games with dozens of track.
Each track is described in a php file located in modules (dozens files in modules prefixed with RGT).
Each track has also a background image located in img width a size of 2Mo each.
My idea was that the user load only 1 track per game. But i see in the network tab of chrome that all my track images are downloaded for each game. Even those that are not required. I have no link to this image neither in php, js or css. It is all made programatically at runtime.
I do not know if this behavior is for development time only.
My question is : How can i prevent downloading of the unused images?
Thank you again for your time