Speed up top nav with turbo routing and external base CSS.
Remove view-transition lag, swap main content without full reload, prefetch pages, and tear down SSE timers on leave. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -42,6 +42,10 @@
|
||||
}
|
||||
|
||||
function prefetchNav(href) {
|
||||
if (window.qihuoPrefetchPage) {
|
||||
window.qihuoPrefetchPage(href);
|
||||
return;
|
||||
}
|
||||
if (!href || href.indexOf(window.location.origin) !== 0) return;
|
||||
if (href === window.location.href) return;
|
||||
var links = document.head.querySelectorAll('link[rel="prefetch"]');
|
||||
|
||||
Reference in New Issue
Block a user