开发者

Recommended Javascript Image preloader [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.

Closed 9 years ago.

开发者_StackOverflow Improve this question

There are a couple of tools and several tutorials (even some including links to github) on how to preloading images and other artifacts, like css and scripts. YUI3 preloader seems to be the most reliable one.

Is there a better one? Are there any others that are faster (possibly through parallel loading), more usable or has better browser compatibility? Maybe one that uses jquery instead of YUI...


I like the jquery preload plugin. Try this.........

http://plugins.jquery.com/project/Preload


As a suggestion, you can use a lazy loader such as this one to only load images once they are have been scrolled and are in the viewport.


This one is the best.

(new Image).src = '/path/to/image/to/preload';

To preload other things (thanks Daniel) you can try this:

document.createElement('object').data = '/path/to/resource/to/preload';
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜