理解学习优化网站

mac2022-06-30  226

前言

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

作为通用的原则,雅虎的工程师团队曾经给出过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 Requests13.Remove Duplicate Scripts2.Use a Content Delivery Network14.Configure ETags3.Avoid empty src or href15.Make AJAX Cacheable4.Add an Expires or a Cache-Control Header16.Use GET for AJAX Requests5.Gzip Components17.Reduce the Number of DOM Elements6.Put StyleSheets at the Top18.No 404s7.Put Scripts at the Bottom19.Reduce Cookie Size8.Avoid CSS Expressions20.Use Cookie-Free Domains for Components9.Make JavaScript and CSS External21.Avoid Filters10.Reduce DNS Lookups22.Do Not Scale Images in HTML11.Minify JavaScript and CSS23.Make favicon.ico Small and Cacheable12.Avoid Redirects 

<待续···>

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

 

转载于:https://www.cnblogs.com/ChandlerVer5/p/Speeding_Up_Your_Web_Site.html


最新回复(0)