Theme performance

Liquid and CSS should provide the normal storefront experience. Add JavaScript only for interaction that cannot be expressed cleanly without it.

Keep the first view light

  • Mark only important above-the-fold media as priority.
  • Lazy-load lower images and provide correct dimensions or aspect ratios.
  • Avoid downloading desktop-sized media for a small mobile card.
  • Keep global CSS small; load section-specific CSS with the section.
  • Avoid large libraries for one tiny effect.

Make JavaScript repeat-safe

Upstorr navigation can replace page content without refreshing. Re-initialize after upstorr:storefront-navigation, but mark enhanced elements so listeners and observers are not attached twice.

Clean up timers, observers and document listeners that no longer own live elements. Respect reduced-motion preferences for animation.

theme check validates architecture and safety; it does not measure visual stability or interaction speed. Test real mobile hardware and a slower connection before merchant release.