The Android network optimization of Ali pen question

Source: Internet
Author: User
Tags browser cache

Remember this is a question and answer question of Ali school recruit written

The answer is the small partners after the spell out, there are some erratic things, the need for friends can do a reference (specific details can be Baidu), welcome to put forward better suggestions!


on the client side:
1. Reduce the number of network requests, the ability to consolidate network requests as far as possible to merge, as far as possible in a single query to complete multiple scattered data query2. Local cache processing for network data3. Set the time-out period, data compression transfer, such as from the server to obtain list data, if it is best to be able to compress the server side of the stream, receive compressed stream, so fast, and save traffic. 3. Multithreading, do not death the result of network operation, put time-consuming work and calculation in sub-thread4. The client requests the data to be as concise as possible, what data needs to request what data, pull the data paging query, use timestamp, LastID and other queries, avoid a lot of data not need to show at once5. Compression of data for a single request, such as gzip compression for HTTP data communication, numeric continuous data (such as latitude and longitude coordinate sequences) can pass the difference value6. For resource files, slices, to make multiple versions of the Save and request, large map small map asynchronous loading7. Respond to timely, as far as possible to give a friendly hint, prompting the user to wait, use ProgressBar or progressdialog, do not let the user feel the program "card Dead"
in the front-end aspect:
1: Reduce HTTP requests, using push mechanism2: Merge compression processing of resources, CSS Sprites merge css images, inline Images embed images into pages or CSS using Data:url scheme3: Script Bottom4: Use browser cache. 5: Load the HTML when the page is first loaded, and then load JS. 6: Simplify pages with HTML5 and CSS3.0

on the server side:
1. Make the database design as much as possible and consider reducing the number of network requests from the design
Business Design Optimization:
1: Everything based on cloud configuration. (Important is the cloud configuration parameters)2: Component-based design, development, dynamic loading3: Network communication module package, return Data unified Processing (Json-mode)

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Android network optimization for Ali pen questions

Related Article

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.