var santaBase = ''; var clientSideRender = true; (function prefetchPages() { 'use strict'; function prefetch(url){ var r = new XMLHttpRequest(); r.open('get', url, true); r.send(); } try { var pageList = publicModel.pageList; if (pageList.masterPage){ prefetch(pageList.masterPage[0]); } var hash = location.hash.split('/'); var pageId = hash[1] || pageList.mainPageId; var pages = pageList.pages; for (var i = 0; i < pages.length; ++i){ if (pages[i].pageId === pageId){ prefetch(pages[i].urls[0]); break; } } } catch(e) {} })();