Added:
- Theme Options > Performance: "Script & style loading" (Optimized / Legacy). Optimized loads each library (Swiper, countdown, accordion, counter, masonry, packery, fancybox, zoom...) only on pages whose content uses it, popups and zoom on first use. Legacy (default after an update) keeps the 2.2 behaviour.
- Theme Options > Performance switches: Slider Revolution only where used, plugin files only where needed (Contact Form 7), prioritise above-the-fold images, newsletter popup after the first interaction, non-blocking secondary stylesheets (theme CSS bundle), remove jQuery Migrate, skip unused Elementor Kit fonts, accessibility improvements, cache of mega menu / after footer content.
- On-demand asset loader (assets/global/js/loader.js) and component registry (Bzotech_Assets::register_component(), bzotech_need(), filter "bzotech_asset_components").
- Fragment cache for mega menu templates and "Append content after footer" (visitors not logged in, cleared on save), filters "bzotech_fragment_cache_*".
- WOFF2 versions of the ElementsKit and Bzotech icon fonts, font-display: swap for icon fonts.
- Main landmark (role="main") and names for image/icon-only links (screen readers).
Updated:
- Sliders start at DOM ready, one per task, those below the fold when they come near the viewport (no long tasks, no repeated initialisation).
- Theme scripts are versioned with the theme version + file time (updates reach browsers/CDNs).
- Elementor CSS of the header/footer/breadcrumb/"Append Content Before" templates, the Elementor Kit and Elementor icons are loaded in <head> (no layout shift).
- Hero background image preloaded with high priority; the first content images load eagerly, header and below-the-fold images lazily.
- Mega menu: templates of sub items are no longer rendered (only top level items show a mega menu).
- "Image down size" option: stored image sizes are no longer regenerated on every request.
- Google Fonts: font-display can be set with the filter "bzotech_google_fonts_display".
- Plugin Bzotech Elementor 2.3 (bundled in the theme "plugins" folder).
Fix:
- Bzotech Elementor 2.2 re-initialised every slider of the page once per widget (very long main thread work, Total Blocking Time up to 46s on phones).
- JS error on resize when the page has no mobile menu of the "menu-style-" type (offset() of an empty set).
- Banner links without URL: role="presentation" instead of an empty link.