TEL: 400-807-6757
Contact us
TEL: 400-807-6757
E-MAIL: service@ra-valve.com

The 14 principles of high performance website

    principle 1 reducing the number of HTTP requests

    website construction construction request, waits for the response takes time, so less number of requests, the better. Reduce requests the general idea is to consolidate resources, reducing the number of file displays a page needs.

    1. Image Map

    by setting the <img> tag's usemap attribute and use <map> tags can be cut out of a picture in multiple areas, points to a different link. Rather than use several images were built linking reduces the number of requests.

    2. CSS Sprite (flattening of the consolidation/map/map locating the CSS map)

    Website by setting the element's background-position style. Generally used for interface icon. Typical can refer to those little buttons at the top of the TinyMCE editor. Multiple thumbnails is actually from a different offset for a larger unified by cutting, and load many buttons on the interface is actually as long as the request once (once), thereby reducing the number of HTTP requests.

    3. Inline Image (inline pictures)

    in <img> does not specify an external URL for the picture files in the src, but picture information directly into. For example, src=, "data:image/gif;base64,R0lGODlhDAAMAL ..." useful under certain special circumstances (such as a small picture on the current page only).

    principle 2 use multiline CDN

    Website offers a variety of routes for your site (for example, China Telecom, China Unicom, China Mobile), multiple location (North, South, West) access, allowing all users to quick access.

    principle 3 using HTTP Cache

    for resources that are not updated frequently (such as static) to longer Expires headers, once these resources are cached, the future can no longer repeat the transmission for a long time.

    principle 4 using Gzip compression

    using Gzip compressed HTTP messages, reduced size, to reduce transmission time.

    principle 5 before the style sheet on the page

    to load the style sheet, so that page rendering to an early start, giving users pages load faster.

    principle 6 the script on the page end

    with 5 reasons, to deal with the page display, page rendering completed earlier, and script logic executed later, so the user pages to load faster.

    principle 7 avoid CSS expression

    overly complex JavaScript scripting logic, DOM lookup, select the actions will reduce the efficiency of page processing.

    principle 8 JavaScript and CSS as an outreach resource

    This seems to be inconsistent with principle 1 of the merge idea, but they're not: consider each page introduces a common JavaScript resource (for example, JavaScript libraries like jQuery or ExtJS), single-page display , Inline (that is, JavaScript embedded in HTML) than outreach pages (using the <script> tag introduction) page load faster (because of fewer HTTP requests). But if there are many pages that introduce the public JavaScript resources, then inline option that would create a duplicate transfer (because the resources are embedded in each page, so every time you open a page is to transfer this part of the resource again, resulting in a waste of network resources). Independent from the resource reference, you can solve this problem.

Copyright ra-valve.com, All rights reserved  E-mail: service@ra-valve.com