Skip to content

XHR Performance Audits with Warning Status and CSV Reporting#63

Merged
iBombit merged 1 commit intomainfrom
feature/lh_v12.8.2
Sep 4, 2025
Merged

XHR Performance Audits with Warning Status and CSV Reporting#63
iBombit merged 1 commit intomainfrom
feature/lh_v12.8.2

Conversation

@iBombit
Copy link
Owner

@iBombit iBombit commented Sep 4, 2025

📋 Summary

Added XHR/AJAX request monitoring to Lighthouse with visual warnings and CSV export capabilities for better performance analysis.

✨ Features Added

🔍 New Audits

  1. XHR Network Requests Audit (network-xhr-audit)

    • Tracks total duration of all XHR/AJAX requests
    • Shows red/yellow warnings when thresholds exceeded
    • Filters out static content and advertisements
  2. XHR Count Audit (xhr-count-audit)

    • Counts number of XHR/AJAX requests
    • Provides scoring based on request volume
    • Helps identify over-fetching issues

📊 CSV Reporting Integration

  • XHR metrics now included in performance CSV reports
  • XHR Requests Duration: Total time spent on XHR calls
  • XHR Requests Count: Number of XHR requests made

⚠️ Thresholds

  • Green: ≤500ms duration, ≤5 requests
  • Yellow: 500-2000ms duration, 5-15 requests
  • Red: ≥2000ms duration, ≥15 requests

🎯 Filtering

Excludes non-performance relevant requests:

  • Static resources (images, CSS, JS, fonts)
  • Advertising networks (DoubleClick, Google Ads, etc.)
  • Tracking scripts

📝 Files Changed

  • network-xhr-audit.js - XHR duration tracking
  • xhr-count-audit.js - XHR count monitoring
  • lighthouse.js - Audit registration
  • csv.js - CSV report export

@iBombit iBombit self-assigned this Sep 4, 2025
@iBombit iBombit merged commit 9a81245 into main Sep 4, 2025
2 of 3 checks passed
@iBombit iBombit deleted the feature/lh_v12.8.2 branch September 4, 2025 19:46
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