Javascript Check for Preloaded Images
Hi,
On my site, the home page has a simple JS script to preload some images. Anyway, if the user enters the site at that page, life carries on. But if they happen to enter at another page, the images aren't preloaded, and it makes a bit of a difference.
I know I could preload the images on every single page of my site (yes, they're on every page) but is there some JS if statement that can check whether the images are already there, and if they are loaded, then don't load them, but if they haven't been loaded, then preload them?
Obviously, this mythical script would have to happen before the page was loaded!
Thanks
Busy posted this at 08:12 — 21st October 2001.
He has: 6,151 posts
Joined: May 2001
what about a gobal javascript and use the onload in the body tag
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.