So I've got a web app that is for all intents and purposes a photo viewer.
When a thumbnail is clicked, the app
- requests the image asset,
- injects it into the DOM as an IMG tag
- and disposes the other
(MooTools Asset.image
, inject
and dispose
).
If they click on an image that has already been loaded I just inject it again since dispose
stores it.
Users look at the images for an average of 12 seconds (according to my stats), that's plenty of time to download a few more.
So my question again, slightly rephrased:
Is it good or bad practice to determine if I should download other assets in the background based on the movement of their mouse?
So if the mouse isn't moving, download the next few assets. If it starts moving, stop and wait for the mouse to stop (and have a little interval before starting to download again, like 1 or two seconds).
It seems like a good idea to me but it just feels like there are some secondary effects I'm not thinking about.
Gracias.