worked
worked

Reputation: 5880

jQuery and Preloading images?

Hey there- Semi new to javascript, 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!

Upvotes: 0

Views: 212

Answers (2)

pthesis
pthesis

Reputation: 336

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?

Upvotes: 1

Micharch54
Micharch54

Reputation: 584

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.

Upvotes: 0

Related Questions