jQuery and Preloading images?
Hey there- Semi new to javascr开发者_StackOverflowipt, a couple of questions. If I preload a bunch of images on Page-1, are they then made available in Page-2 instantly? What if Page-2 displays these images via a jQuery plugin, do the same rules apply? Thanks!
Yes, they should be available on page 2, because if you preload rollover states for navigation buttons, for example, you only need to preload them the first time the site is accessed. The images are then cached and available to subsequent pages you view on the same site.
I'm not sure about the jQuery plugin part. Do you know the specific plugins you'll be using?
I haven't done any testing on this, but I'd imagine a lot of this depended on how the user had their caching set up. Generally speaking you can pre-load images and they'll remain the cache. There's a nifty html5 feature that allows for pre-loading to help with this as well.
精彩评论