IMPR: Preload logo

This commit is contained in:
Tony Air 2024-06-21 22:30:45 +02:00
parent a4d463e99d
commit f11151338e

View File

@ -241,6 +241,10 @@ class DeferredRequirements implements TemplateGlobalProvider
} }
unset($fonts, $font); unset($fonts, $font);
$html .= '<link rel="preload" as="image" href="'
.WebpackTemplateProvider::resourcesURL('logo.png')
.'" />';
/*$preloadPath = Controller::curr()->Link().'?ajax=1'; /*$preloadPath = Controller::curr()->Link().'?ajax=1';
$html .= '<link rel="preload" as="fetch" href="'.$preloadPath.'" />'."<script>fetch('".$preloadPath."', {method:'GET',credentials:'include',mode:'no-cors'}).then((r)=>{return r.json()}).then((d)=>{window.preloadedData = d})</script>";*/ $html .= '<link rel="preload" as="fetch" href="'.$preloadPath.'" />'."<script>fetch('".$preloadPath."', {method:'GET',credentials:'include',mode:'no-cors'}).then((r)=>{return r.json()}).then((d)=>{window.preloadedData = d})</script>";*/