Preloading and Resource Hints #6

Open
opened 2026-09-13 07:24:18 +00:00 by kevin.bataille · 0 comments
Owner

Problem Statement

Pages may not be cached when first visited by real users. External resources require DNS lookups. Fonts block rendering.

Solution

Preload cache via sitemap crawling, add DNS prefetch for external domains, preload critical resources, and optimize font loading.

User Stories

  1. As a site owner, I want to preload cache via sitemap crawling, so that popular pages are always warm
  2. As a site owner, I want to preload specific URLs, so that important pages are always cached
  3. As a site owner, I want DNS prefetch for external domains, so that DNS lookups happen early
  4. As a site owner, I want to preload critical resources (fonts, CSS), so that they load faster
  5. As a site owner, I want to prefetch likely next pages, so that navigation feels instant
  6. As a site owner, I want to control preloading frequency, so that server load is managed
  7. As a site owner, I want to see preloading status and logs, so that I can monitor the process
  8. As a site owner, I want preloading to respect crawl limits, so that the server is not overwhelmed
  9. As a site owner, I want preloading to work with multisite, so that each site is preloaded independently
  10. As a site owner, I want to manually trigger preloading, so that I can warm cache after changes

Implementation Decisions

  • Preload via WordPress HTTP API crawling sitemap
  • DNS prefetch via link rel="dns-prefetch" tags
  • Resource preload via link rel="preload" tags
  • Crawl scheduling via WordPress cron
  • Crawl rate limiting to avoid server overload
  • Queue-based preloading for reliability

Testing Decisions

  • Test sitemap crawling generates cache files
  • Test DNS prefetch tags are added
  • Test resource preload tags are added
  • Test crawl rate limiting works
  • Test manual preload triggers
  • Test multisite preloading

Out of Scope

  • CDN cache purging (separate feature)
  • Server-level cache preloading

Further Notes

Preloading should work independently of other features.

## Problem Statement Pages may not be cached when first visited by real users. External resources require DNS lookups. Fonts block rendering. ## Solution Preload cache via sitemap crawling, add DNS prefetch for external domains, preload critical resources, and optimize font loading. ## User Stories 1. As a site owner, I want to preload cache via sitemap crawling, so that popular pages are always warm 2. As a site owner, I want to preload specific URLs, so that important pages are always cached 3. As a site owner, I want DNS prefetch for external domains, so that DNS lookups happen early 4. As a site owner, I want to preload critical resources (fonts, CSS), so that they load faster 5. As a site owner, I want to prefetch likely next pages, so that navigation feels instant 6. As a site owner, I want to control preloading frequency, so that server load is managed 7. As a site owner, I want to see preloading status and logs, so that I can monitor the process 8. As a site owner, I want preloading to respect crawl limits, so that the server is not overwhelmed 9. As a site owner, I want preloading to work with multisite, so that each site is preloaded independently 10. As a site owner, I want to manually trigger preloading, so that I can warm cache after changes ## Implementation Decisions - Preload via WordPress HTTP API crawling sitemap - DNS prefetch via link rel="dns-prefetch" tags - Resource preload via link rel="preload" tags - Crawl scheduling via WordPress cron - Crawl rate limiting to avoid server overload - Queue-based preloading for reliability ## Testing Decisions - Test sitemap crawling generates cache files - Test DNS prefetch tags are added - Test resource preload tags are added - Test crawl rate limiting works - Test manual preload triggers - Test multisite preloading ## Out of Scope - CDN cache purging (separate feature) - Server-level cache preloading ## Further Notes Preloading should work independently of other features.
kevin.bataille added the phase-4 label 2026-09-13 07:28:55 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kevin.bataille/wp-recache#6