About website weight loss (asynchronous loading of website sections)

Source: Internet
Author: User

Now the user experience is becoming more and more important. A website must have a rich set of content. How can we present all the topics to users faster and better? I think asynchronous loading technology is one of the solutions.

For example, when a user browses a page, the content to be downloaded is htmlCode, JS Code, CSS code, images, and Flash. These can only be linearly downloaded. That is to say, if the total size of these content is kb, the user must download these kb content in sequence. Of course, ie or Firefox has its own reading method, after careful observation, they will find that they will present part of the content in advance, but it is still linear, just reading part of the content. How to quickly present content to users and reduce the user's sense of waiting.

First, the interface first divides the area according to the layout, such
<Div id = "menu"> </div>
<Div id = "title"> </div>
<Div id = "context"> </div>
<Div id = "Copyright"> </div>

When the user enters the interface, only the above HTML size is read, and the specific content is asynchronously loaded through XMLHTTP. The JS pseudo code is as follows:
<SCRIPT>
Async ('menu/index.htm', 'menu ');
Async ('title/index.htm', 'menu ');
Async ('Context/index.htm', 'menu ');
Async ('copyright/index.htm', 'menu ');
</SCRIPT>

Each interface is read asynchronously at the same time. This means that the content of multiple columns is read at the same time, which gives users a better user experience.

I am sorting out the specific encapsulation and reading methods.

Website example: http://www.plaxo.com and so on

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.