开发者

Techniques to keep animated gifs "animating" during periods of high load?

开发者 https://www.devze.com 2022-12-10 01:02 出处:网络
In situations where a browser is under intense loa开发者_高级运维d I find that animated gifs, for example a throbber, will stop animating until the load subsides.This behaviour seem to be consistent a

In situations where a browser is under intense loa开发者_高级运维d I find that animated gifs, for example a throbber, will stop animating until the load subsides. This behaviour seem to be consistent across the browsers I've tried (Firefox, Safari, IE, Opera, ...).

Am wondering if there are any techniques I can use to ensure that animation continues during these periods.

Thanks! Matt


You might be able to alleviate it by decreasing the length of time the browser spends on any particular task. Split out the JavaScript loading, or defer some of it. See if you really need to be doing all your JavaScript tasks right as the page loads. Defer some of the image loading, especially images below the fold.

Think of the browser as a single-threaded piece of code; you need to break up the tasks it has to do so that there's time in there to update the throbber animation.


You have no control on the page side except for reducing the load on the browser that the page actually contributes.

Maybe you could use the services of YSLOW to help you? It's a Firefox/Firebug plugin.

0

精彩评论

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

关注公众号