Skip to content

feat: add Fetch & XHR Timeline DevTools Override snippet#71

Merged
nucliweb merged 3 commits intomainfrom
feat/devtools-overrides-fetch-xhr-timeline
Apr 20, 2026
Merged

feat: add Fetch & XHR Timeline DevTools Override snippet#71
nucliweb merged 3 commits intomainfrom
feat/devtools-overrides-fetch-xhr-timeline

Conversation

@nucliweb
Copy link
Copy Markdown
Owner

@nucliweb nucliweb commented Apr 18, 2026

Summary

  • Adds a two-part DevTools Override snippet that intercepts all fetch() and XHR calls from page initialization and correlates them with LCP timing
  • Inject snippet patches window.fetch and XHR.prototype before any other script runs, capturing calls invisible to the Network panel (cross-origin without Timing-Allow-Origin)
  • Read snippet generates a structured console report covering four diagnostic cases:
    • Calls before LCP — critical path candidates with deferral/caching recommendation
    • Bootstrap errors — failed calls before LCP that silently add latency
    • Auth-related calls — detected by URL pattern (/auth, /login, /token, /session, /oauth, /me, /whoami, /identity, authIndexType query param)
    • Complete network inventory — all calls with Auth column and cross-origin visibility note

Test plan

  • Enable DevTools Overrides on a target page and add the inject snippet inside <script> before </head>
  • Reload the page, then run the read snippet in the console
  • Verify LCP timing appears and Before LCP column shows ⚠️/no correctly
  • Verify auth-related calls are flagged with 🔑
  • Verify bootstrap errors section appears when calls fail before LCP

Adds a two-part DevTools Override snippet that intercepts all fetch()
and XHR calls from page initialization and correlates them with LCP timing.

- Inject snippet patches window.fetch and XHR.prototype early, captures
  all calls including cross-origin, and records LCP via PerformanceObserver
- Read snippet reports four diagnostic sections: calls before LCP (critical
  path candidates), bootstrap errors (failed calls before LCP), auth-related
  calls (detected by URL pattern), and complete network inventory
- Auth detection covers /auth, /login, /token, /session, /oauth, /me,
  /whoami, /identity path segments and authIndexType query params
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
webperf-snippets Ready Ready Preview, Comment Apr 20, 2026 3:20pm
webperf-snippets-u6am Ready Ready Preview, Comment Apr 20, 2026 3:20pm

@nucliweb nucliweb merged commit 6f7bd84 into main Apr 20, 2026
4 checks passed
@nucliweb nucliweb deleted the feat/devtools-overrides-fetch-xhr-timeline branch April 20, 2026 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant