如何提升网站性能 Website Performance Optimization
来源:互联网 发布:三菱软件读出模式 编辑:程序博客网 时间:2024/04/29 09:31
This article was written by Bob Feldbauer (@bobfeldbauer)
Optimizing website performance can dramatically increase conversions and loyalty, and decrease costs. Although it may be traditionally viewed as a responsibility of developers, the reality is that sysadmins are also often asked to work on website performance optimization.
The following is intended as a busy sysadmin's "crash course" in optimizing website performance.
As with trying to optimize any process, you should establish a baseline to measure any changes against. Install the Firebug Firefox plugin and Yahoo!'s YSlow add-on to measure your initial performance and verify improvements as you make changes. To see performance changes over time from a consistent external source, you can use free tools like Pingdom's Full Page Test or Octagate's SiteTimer. Also, Google's Webmaster Tools shows optimization suggestions based on the Page Speed tool, and crawl stats for the average time spent downloading a page from your site.
Yahoo!'s research shown in the table below shows 62-95% of the time required to load a page is spent making HTTP requests for non-HTML components like images, scripts, and stylesheets. See the following table for the time spent loading HTML vs non-HTML components for popular websites:
As the table indicates, reducing the number of HTTP requests can provide one of the biggest increases in performance. Aggregating CSS and JavaScript into as few files as possible and using CSS Sprites are two ways to reduce the number of HTTP requests.
In addition to reducing the number of HTTP requests, being able to load scripts in parallel instead of serially can improve performance. A newly developed tool calledHead JS can be used to load JavaScript scripts in parallel, while retaining execution order. This allows scripts to load without blocking other components from loading.
Most sites include static files that change infrequently (CSS, images, JavaScript, etc) and can benefit from appropriate HTTP caching. See the Google's Page Speed team'sguide to HTTP caching for more information.
Another important step in website performance optimization is configuring your web or application server to deliver gzip compressed content. On typical sites, gzipping content reduces text size by 75% and total size by 37%.
In addition to gzip compression, making images, scripts, and CSS files smaller also helps - especially when loading a site on lower bandwidth connections like mobile devices. Even if you gzip scripts or CSS files, you can "minify" them to further reduce their size by 5% or more. Yahoo!'s YUI Compressor can minify both CSS and JavaScript, while Yahoo's Smush.it can optimize image sizes without losing quality.
Although there are many other things you can do to optimize website performance, this "crash course" in optimization should get you started.
Further reading:
- Yahoo!'s Exceptional Performance team's
- Web Performance Best Practices by Google's Page Speed team
- 如何提升网站性能 Website Performance Optimization
- 如何提升网站的性能?
- performance optimization
- performance optimization
- 网站性能提升
- 网站性能提升思路
- Database performance optimization
- OpenGL Performance Optimization
- OpenGL Performance Optimization
- OpenGL Performance Optimization
- OpenGL Performance Optimization
- OpenGL Performance Optimization(转载)
- performance optimization in C#
- AS3 Performance Optimization
- Magento Site Performance Optimization
- OpenGL Performance Optimization
- Python performance optimization
- OpenGL Performance Optimization
- Oozie 与 Yarn 协同工作
- The area(高数)
- egfshfhsf
- 关于学习Linux的经典书籍 (深入理解Linux内核、Linux设备驱动程序等)
- HDOJ 题目1211RSA(数学)
- 如何提升网站性能 Website Performance Optimization
- MFC错误集锦
- ls背后发生了什么 Down the 'ls' Rabbit Hole
- fhdjfgj
- javascript的arguments
- MFC学习碎片
- hadoop中使用python写mapreduce遇到的问题
- 随机密码生成器
- c#基础知识复习