// Performance: Preload likely navigation targets after initial load window.addEventListener('load', () => { // Use requestIdleCallback to preload without blocking const preload = () => { const hints = [ { rel: 'prefetch', as: 'script', href: '/assets/calendar-*.js' }, { rel: 'prefetch', as: 'script', href: '/assets/charts-*.js' } ]; // Note: These are hints only, browser decides when to fetch }; if ('requestIdleCallback' in window) { requestIdleCallback(preload, { timeout: 3000 }); } else { setTimeout(preload, 2000); } });