Mobile Site performance Optimization

Source: Internet
Author: User

Code optimization can improve the performance of your website
Optimization rules:
1. Minimizing HTTP Requests
1). Merge CSS background images.
The Background-position property sets the starting position of the background image.
2). Merge style sheets and scripts.
Optimization method: Require.js
3). Compress picture
4). Avoid redirects


2. Script Execution Optimizations
1). css written on the head
2). JavaScript written at the tail or async


3.CSS optimization
1) Try to avoid writing the style attribute in the HTML tag
2) Avoid using CSS expressions
3) A value of 0 does not require any units for browser compatibility and performance, with a value of 0 do not bring the unit
4) do not misuse float,float in the rendering of a large amount of calculation, to minimize the use of
5) Do not declare too much font-size too much font-size to trigger the efficiency of the CSS tree


4.javascript optimization
1) Try to use the ID Selector ID selector is the fastest
2) Touch Event optimizer uses Touchstart, touchend instead of click, because it quickly affects speed. However, it should be noted that touch response is too fast and easy to cause misoperation

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

Mobile Site performance Optimization

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.