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