理解学习优化网站

前言

网站设计的优化是一个很大的话题,有一些通用的原则,也有针对不同开发平台的一些建议。这方面的研究一直没有停止过,我在不同的场合也分享过这样的话题。

作为通用的原则,雅虎的工程师团队曾经给出过35个最佳实践。这个列表请参考  Best Practices for Speeding Up Your Web Site  http://developer.yahoo.com/performance/,同时,他们还发布了一个相应的测试工具Yslowhttp://developer.yahoo.com/yslow/

我强烈推荐所有的网站开发人员都应该学习这些最佳实践,并结合自己的实际项目情况进行应用。 接下来的一段时间,我将结合ASP.NET这个开发平台,针对这些原则,通过一个系列文章的形式,做些讲解和演绎,以帮助大家更好地理解这些原则,并且更好地使用他们。

准备工作

为了跟随我进行后续的学习,你需要准备如下的开发环境和工具

Google Chrome 或者firefox ,并且安装 Yslow这个扩展组件.请注意,这个组件是雅虎提供的,但目前没有针对IE的版本。

https://chrome.google.com/webstore/detail/yslow/ninejjcohidippngpapiilnmkgllmakh

https://addons.mozilla.org/en-US/firefox/addon/yslow/

你应该对这些浏览器的开发人员工具有所了解,你可以通过按下F12键调出这个工具。

Web Performance Best Practices and Rules

Yahoo's Exceptional Performance team has identified 34 rules that affect web page performance. YSlow's web page analysis is based on the 23 of these 34 rules that are testable. Click each performance rule below to see the details.

1.Minimize HTTP Requests 13.Remove Duplicate Scripts
2.Use a Content Delivery Network 14.Configure ETags
3.Avoid empty src or href 15.Make AJAX Cacheable
4.Add an Expires or a Cache-Control Header 16.Use GET for AJAX Requests
5.Gzip Components 17.Reduce the Number of DOM Elements
6.Put StyleSheets at the Top 18.No 404s
7.Put Scripts at the Bottom 19.Reduce Cookie Size
8.Avoid CSS Expressions 20.Use Cookie-Free Domains for Components
9.Make JavaScript and CSS External 21.Avoid Filters
10.Reduce DNS Lookups 22.Do Not Scale Images in HTML
11.Minify JavaScript and CSS 23.Make favicon.ico Small and Cacheable
12.Avoid Redirects  

<待续···>

<摘自:https://developer.yahoo.com/yslow/&http://www.cnblogs.com/chenxizhang/archive/2013/05/05/3060804.html>

 

没有人告诉你,生活会是这样:你工作无趣,你袋里没钱,你的爱情总是昙花一现;妈妈警告过你,会有这样的日子但她没有告诉你,世界将让你屈服。但是,别怕,有我在你身边,谁让我们是friends呢……
原文地址:https://www.cnblogs.com/ChandlerVer5/p/Speeding_Up_Your_Web_Site.html