So, I have a web application designed to view photos.
When you click on a thumbnail application
- requests an image object
- injects it into the DOM as an IMG tag
- and provides another
(MooTools Asset.image , inject and dispose ).
If they click on an already downloaded image, I will simply add it again, since dispose saves it.
Users look at images for an average of 12 seconds (according to my statistics), which is enough time to download a few more.
So my question is again, slightly paraphrased:
Good or bad practice is to determine whether other assets should be loaded in the background based on their mouse movement?
So, if the mouse does not move, load the next few assets. If it starts moving, stop and wait for the mouse to stop (and you will have a short interval before loading again, for example, 1 or 2 seconds).
It seems like a good idea to me, but it seems to me that there are some side effects that I don't think about.
Gracias.
source share