pushStatesupportexistsonapurelyopt-inbasisinBackbone.Olderbrowsersthatdon'tsupportpushStatewillcontinuetousehash-basedURLfragments,andifahashURLisvisitedbyapushState-capablebrowser,itwillbetransparentlyupgradedtothetrueURL.NotethatusingrealURLsrequiresyourwebservertobeabletocorrectlyrenderthosepages,soback-endchangesarerequiredaswell.Forexample,ifyouhavearouteof/documents/100,yourwebservermustbeabletoservethatpage,ifthebrowservisitsthatURLdirectly.Forfullsearch-enginecrawlability,it'sbesttohavetheservergeneratethecompleteHTMLforthepage...butifit'sawebapplication,justrenderingthesamecontentyouwouldhavefortherootURL,andfillingintherestwithBackboneViewsandJavaScriptworksfine.看不太懂这一段,能举一个例子吗?
繁星淼淼
Qyouu
随时随地看视频慕课网APP
相关分类