1: Minimize HTTP Requests
Quote:
http://developer.yahoo.com/performance/rules.html#num_http
80% of the end-user response time is spent on the front-end. Most of this time is tied up in downloading all the components in the page: images, stylesheets, scripts, Flash, etc. Reducing the number of components in turn reduces the number of HTTP requests required to render the page. This is the key to faster pages.
One way to reduce the number of components in the page is to simplify the page's design. But is there a way to build pages with richer content while also achieving fast response times? Here are some techniques for reducing the number of HTTP requests, while still supporting rich page designs.
Image maps combine multiple images into a single image. The overall size is about the same, but reducing the number of HTTP requests speeds up the page. Image maps only work if the images are contiguous in the page, such as a navigation bar. Defining the coordinates of image maps can be tedious and error prone.
CSS Sprites are the preferred method for reducing the number of image requests. Combine all the images in your page into a single image and use the CSS background-image and background-position properties to display the desired image segment.
Inline images use the
data: URL scheme to embed the image data in the actual page. This can increase the size of your HTML document. Combining inline images into your (cached) stylesheets is a way to reduce HTTP requests and avoid increasing the size of your pages.
Combined files are a way to reduce the number of HTTP requests by combining all scripts into a single script, and similarly combining all stylesheets into a single stylesheet. It's a simple idea that hasn't seen wide adoption. The ten top U.S. web sites average 7 scripts and 2 stylesheets per page. Combining files is more challenging when the scripts and stylesheets vary from page to page, but making this part of your release process improves response times.
Reducing the number of HTTP requests in your page is the place to start. This is the most important guideline for improving performance for first time visitors. As described in Tenni Theurer's blog
Browser Cache Usage - Exposed!, 40-60% of daily visitors to your site come in with an empty cache. Making your page fast for these first time visitors is key to a better user experience.
分享到:
相关推荐
IMPORTANT CHANGE TO CONTEST RULES FOR MCM/ICM 2010: Teams (Student or Advisor) are now required to submit an electronic copy of their solution paper by email to solutions@comap.com. Your email MUST ...
原书最新第5版 Need help finding the right ...If you’re an experienced web designer or developer who needs a quick resource for working with established web standards, this handy book is indispensable.
Publisher: O'Reilly Media ...If you’re an experienced web designer or developer who needs a quick resource for working with established web standards, this handy book is indispensable.
quality code for their asynchronous tasks by building a relatively simple application that will use advanced RxJava techniques to produce a high quality product. First of all, the book will lead a ...
Project catch-up: An educational program for socially disadvantaged thirteen and fourteen year olds PROJECT CATCH-UP: AN EDUCATIONAL PROGRAM FOR SOCIALLY DISADVANTAGED THIRTEEN AND FOURTEEN YEAR ...
known as the MUST method, after a Danish acronym for theories and methods of initial analysis and design activities – was developed and tested in thirteen industrial design projects for companies and...
Publisher : Addison Wesley... A technique for building debugging support into your software without a ton of overhead Thirteen specific techniques to improve the overall performance of your software
外研版一起小学英语三下册《Module 4Unit 2 Thirteen,fourteen,fifteen...》word教案 (1).docx
Thirteen 0 clock
Netflix gauged the show's potential from data it had gathered about subscribers' preferences, ordered two seasons without seeing a pilot, and uploaded the first thirteen episodes all at once for ...
What you will learnLoad, interact, dissect, process, and save complex datasetsSolve classification and regression problems using state of the art techniques Predict the outcome of a simple time series...
Pro Bash Programming teaches you how to effectively utilize the Bash shell in your programming. The Bash shell is a complete programming language, not merely a glue to combine external Linux commands....
小贝程序员生活\课件\java\javaclass\thirteen lesson.rar
During a thirteen-year hiatus from academic work before joining George Mason, he was director of research and design at the world's largest independent producer of Fortran and C general-purpose ...
Water surface slope is a significant component to many equations for modeling hydraulics, sediment transport, and fluvial geomorphic processes (Knighton, 1999, Sing & Zang, in press). Traditional ...
git基本操作/*我们使用 git clone 从现有 Git 仓库中拷贝项目*/git clone "Git仓库" "本地目录" git clone git@github.com:hao-1172624289/thirteen.git//SSH协议(快速、安全)git clone git://github....
基于MATLAB/Simulink的IEEE 13节点潮流计算仿真模型。