开发者

is it good to put a javascript preloader for a website? [closed]

开发者 https://www.devze.com 2023-01-21 00:41 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help clari
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 12 years ago.

Why do most of the websites doesn't have a preloader? I am thinking to put a preloader for my website, but I wonder why many website which needs a preloader for their heavy content开发者_StackOverflow but they don't have one ? And I am looking for a good preloader tutorial.


Because most website content are not large enough to warrant a preloader. A website generally loads in less than a second on most connections.

For those AJAX-accelerated websites that load the entire website in the background (all pages, etc.), they usually employ a prioritization system so that the pages being viewed are loaded first, and thus, the above still holds true.


I don't know what you mean by preloader, But for the major frameworks, You should use the public Google repository.

This means users are more likely to have the JS cached already. This will speed up your site.

Also make sure all JS content is minimized, and you have compression turned on in your server.


I assume you are referring to preloading content via JavaScript. This used to be done quite often, and in a few scenarios is appropriate to use. However, due to recent browser benchmarking, it has been found that placing JavaScript at the bottom of the body mostly eliminates the need for preloading. Additionally, as Byron mentioned, you should use the google CDN for resources like jquery.

0

精彩评论

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