- 1、本文档共97页,可阅读全部内容。
- 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
腾讯大讲堂09-如何建设高性能网站
* * * * * * * Look out for the Number One * * The data in Table 2 reflects only cookies set at the top domain levels to eliminate any cookies that may have been set by ads * A cookie set at the . domain impacts the response time for every Yahoo! page in the . domain that a user visits. 尽量减少不必要的cookies 将cookie的size缩小 将cookie放到domain level的时候要谨慎小心,尽量不要影响其他的sub domain 将expiration date合理设置 * * 既然对最终用户反应时间的最大影响来自与有多少个组件要被请求,为什么不能一次同时将他们下载完呢?主要是因为http/1.1的规范,浏览器每次只能同时从单个hostname下载两个组件 * 但是如果一个网站将自己的组件平均地分配到两个hostname上,就会像下图 * * 那么到底是不是将组件分配到越多hostname越好呢,我们也做了测试。The experiment measured an empty HTML document with 20 images on the page. The images were fetched from the same servers as those used by real Yahoo! pages. We ran the experiment in a controlled environment using a test harness that fetches a set of URLs repeatedly while measuring how long it takes to load the page on DSL. * * We fetch 20 smaller-sized images (36 x 36 px) and 20 medium-sized images (116 x 61 px). To our surprise, increasing the number of aliases for loading the medium-size images (116 x 61px) worsens the response times using four or more aliases. Increasing the number of aliases by more than two for smaller-sized images (36 x 36px) doesn’t make much of an impact on the overall response time. On average, using two aliases is best. One possible contributor for slower response times is the amount of CPU thrashing on the client caused by increasing the number of parallel downloads. Another issue to consider is that DNS lookup times vary significantly across ISPs and geographic locations. * * * * * check out this image, used on Yahoo!s homepage, or this one from Googles. * * * * serving compressed HTML, CSS, client-side scripts, and any other type of text content. If you make XMLHttpRequests to services that return XML (or JSON, or plain text), make sure your server gzips as well * Theres one gotcha when it comes to serving gzipped content: you must make sure that proxies do not get in y
文档评论(0)