欢迎来到天天文库
浏览记录
ID:34600971
大小:219.30 KB
页数:14页
时间:2019-03-08
《high-performance-web-sites2.pdf》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、PerformanceResearch,Part2:BrowserCacheUsage-Exposed!»Yahoo!UserInterf...Page1of14Yahoo!UserInterfaceBlogòBlogòAboutsearchinblog...PerformanceResearch,Part2:BrowserCacheUsage-Exposed!January4,2007at12:24pmbyTenniTheurer
2、InDevelopment
3、Thisisthesecondinaseriesofarticlesdescribingexperimentsconductedtol
4、earnmoreaboutoptimizingwebpageperformance.Youmaybewonderingwhyyou’rereadingaperformancearticleontheYUIBlog.Itturnsoutthatmostofwebpageperformanceisaffectedbyfront-endengineering,thatis,theuserinterfacedesignanddevelopment.Inanearlierpost,IdescribedWhatthe80/20RuleTellsUsaboutReducingHTTPRequests.Sin
5、cebrowsersspend80%ofthetimefetchingexternalcomponentsincludingscripts,stylesheetsandimages,reducingthenumberofHTTPrequestshasthebiggestimpactonreducingresponsetime.Butshouldn’teverythingbesavedinthebrowser’scacheanyway?Whydoescachematter?It’simportanttodifferentiatebetweenenduserexperiencesforanempt
6、yversusafullcachepageview.An“emptycache”meansthebrowserbypassesthediskcacheandhastorequestallthecomponentstoloadthepage.A“fullcache”meansall(oratleastmost)ofthecomponentsarefoundinthediskcacheandthecorrespondingHTTPrequestsareavoided.Themainreasonforanemptycachepageviewisbecausetheuserisvisitingthep
7、ageforthefirsttimeandthebrowserhastodownloadallthecomponentstoloadthepage.Otherreasonsinclude:òTheuservisitedthepagepreviouslybutclearedthebrowsercache.òThebrowsercachewasautomaticallycleared,basedonthebrowser’ssettings.òTheuserreloadedthepageinawaythatcausedthecachetobebypassed.Forexample,thebrowse
8、rwillbypassthecacheifyouholddownthecontrol-shiftkeywhileclickingtheRefreshbuttoninInternetExplorer.Strategiessuchascombiningscripts,stylesheets,orimagesreducethenumberofHTTPrequestsforbothanemptyandafullcachepageview.ConfiguringcomponentstohaveanExpiresheaderwithadateinthefuturereducesthenumberofHTT
9、Prequestsforonlythefullcachepageview.Previously,weobservedwherethetimeisspentwhenauserrequestshttp://www.yahoo.comwithanemptycache.Whenauserloadsthepage,thebrowserdownloadsapproximately30components(se
此文档下载收益归作者所有
点击更多查看相关文章~~