Skip to content

Performance: Add Frontend Asset Preloading Strategy with Priority Hints #508

Description

@Smartdevs17

Context

Critical resources (fonts, logos, API responses) load after non-critical assets, delaying time-to-first-meaningful-paint and time-to-interactive.

Current Limitation/Problem

Asset loading order is uncontrolled. Fonts, hero images, and critical CSS may be delayed behind analytics scripts and non-critical resources.

Expected Outcome

A comprehensive preloading strategy using priority hints, preload/preconnect/prefetch links, and resource prioritization based on critical rendering path.

Acceptance Criteria

  • Implement priority hints: high priority for hero images, fonts, critical API calls
  • Preload: critical fonts (WOFF2), above-the-fold images, critical CSS
  • Preconnect: API origin, CDN, RPC endpoints (reduce connection time)
  • Prefetch: likely next pages (based on navigation patterns)
  • Resource timing: measure and optimize LCP and FID
  • Target: LCP <2.5s, FID <100ms, CLS <0.1
  • Script loading: async/defer for non-critical JS
  • Font display: swap/optional to prevent invisible text
  • Audit: Lighthouse performance score >90

Technical Scope

  • frontend/src/app/layout.tsx - preload/preconnect links
  • Next.js next/script with strategy configuration
  • Priority hint integration in Image component
  • Resource Hints: rel="preload", rel="preconnect", rel="dns-prefetch"
  • Web Vitals monitoring integration
  • Edge cases: over-preloading (bandwidth waste), browser support, data-saver mode

Metadata

Metadata

Assignees

Labels

200-points200 point issueStellar WaveIssues in the Stellar wave programdrips-waveIssues in the Drips Wave programhighHigh complexity issue

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions