Detecting and Diagnosing Errors in Serving Archived Web Pages
Jingyuan Zhu (University of Michigan), Huanchen Sun (University of Southern California), Harsha V. Madhyastha (University of Southern California)
23rd USENIX Symposium on Networked Systems Design and Implementation (NSDI '26) · Day 1 · Managing Complexity at Scale
Overview
Web archiving services, such as the Internet Archive's Wayback Machine, play a critical role in preserving digital history by capturing and storing historical snapshots of web pages. However, serving these archived pages back to users with high fidelity is surprisingly difficult. When a user requests an archived snapshot, the archival system must not only serve the raw HTML but also rewrite embedded links and execute modern JavaScript to redirect sub-resource fetches (such as AJAX requests) back to the archival host rather than the live web. Because JavaScript execution is highly complex and dynamic, these rewrites frequently fail, leading to broken functionalities, missing images, or dropped UI components in the archived copy.

Key moments
- 0:00 Introduction and motivation for web page archiving
- 2:00 How web archives operate: capturing and serving snapshots
- 3:58 Challenges in JavaScript rewriting and resulting fidelity errors
- 6:00 Introduction to Fedex and limitations of runtime error detection
- 8:00 Critical rendering path and limitations of screenshot comparisons
- 10:00 Layout tree matching and tracking JavaScript writes
- 11:42 Evaluation, false positive rates, and root cause diagnosis
- 13:58 Applying fixes to PyWB and conclusion
Detecting and Diagnosing Errors in Serving Archived Web Pages
Speakers: Jingyuan Zhu, University of Michigan; Huanchen Sun, University of Southern California; Harsha V. Madhyastha, University of Southern California
Conference: USENIX NSDI
YouTube: https://www.youtube.com/watch?v=rCMNURGCq1E
Overview
Web archiving services, such as the Internet Archive's Wayback Machine, play a critical role in preserving digital history by capturing and storing historical snapshots of web pages. However, serving these archived pages back to users with high fidelity is surprisingly difficult. When a user requests an archived snapshot, the archival system must not only serve the raw HTML but also rewrite embedded links and execute modern JavaScript to redirect sub-resource fetches (such as AJAX requests) back to the archival host rather than the live web. Because JavaScript execution is highly complex and dynamic, these rewrites frequently fail, leading to broken functionalities, missing images, or dropped UI components in the archived copy.
This talk introduces Fedex (referred to interchangeably in technical evaluation as Fidel), a comprehensive system designed to automatically detect fidelity violations in archived web pages and pinpoint their root causes. Traditional quality assurance techniques rely on naive checks, such as comparing final visual screenshots or monitoring runtime console errors. These methods fail because visual snapshots are highly sensitive to harmless animations and video playback (yielding high false-positive rates), while runtime exceptions often occur without causing visible rendering failures. Fedex solves this by analyzing the browser's critical rendering path, specifically matching layout trees and associating them with specific JavaScript write stack traces.
Evaluated across 80,000 pages sampled from the top 1 million sites, Fedex successfully reduces false-positive rates by 50% compared to baseline heuristics. Furthermore, diagnosing the detected violations revealed that fixing just the top four error groups resolves more than 60% of broken archive pages. By contributing these patches directly to PyWB (Python Wayback), the authors reduced overall fidelity violation rates from 50% down to 9% without introducing regression bugs.
Background
▶ Watch: Introduction and motivation for web page archiving (0:00)
Web archiving operates on a dual-pipeline architecture: capturing and serving. The capturing pipeline functions similarly to a standard web browser navigation, fetching HTML, parsing dependencies, executing initial scripts, and compiling all gathered responses into a WARC (Web ARChive) file. The serving pipeline must reverse this process during replay. If an archived HTML file retains its original absolute URLs, a user's browser will attempt to fetch sub-resources (images, stylesheets, scripts) from the live web. If the live resource has changed or disappeared, the archive breaks.
To prevent this, archival replay servers rewrite HTML and JavaScript to route sub-resource requests through the archive host. While rewriting HTML anchor tags and image sources is straightforward, rewriting JavaScript is notoriously brittle. Modern web applications trigger fetches through complex event handlers, asynchronous framework routines, and dynamic DOM manipulations. Imperfect JavaScript rewriting leads to two primary failure modes:
- Appearance Degradation: Missing images or unrendered components caused by uncaught exceptions that halt execution before page rendering completes.
- Functional Failure: Non-functional UI elements (such as missing drop-down menus or disabled event listeners) where scripts execute silently without throwing console errors.
Prior attempts to automate quality assurance for web archives have fallen short. Screenshot-based comparison tools (commonly used in web development frameworks like BrowserStack) struggle with modern dynamic media. A video, GIF, or ticker animation will produce entirely different pixel outputs across two identical page loads, generating massive false-positive counts. Conversely, monitoring runtime error logs (Moire's baseline) misses silent failures while flagging harmless syntax warnings in third-party analytical scripts that do not impact user-facing fidelity.
Key Findings
▶ Watch: Challenges in JavaScript rewriting and resulting fidelity errors (3:58)
The primary discovery presented in this work is that detecting web archive fidelity violations cannot rely solely on final visual outputs or raw runtime error logs. Instead, robust detection requires inspecting intermediate rendering structures.
Key findings from the large-scale evaluation of Fedex include:
- False Positive Reduction: Screenshot-based matching methods generate excessive false alarms due to dynamic elements like videos and animations. Fedex reduces false-positive rates by 50% compared to standard screenshot baselines.
- Error Concentration: Analysis of the detected fidelity violations across 80,000 pages shows that failure causes follow a heavy-tailed distribution. While hundreds of distinct edge-case errors exist in the long tail, focusing engineering effort on the top four error groups resolves more than 60% of all target archive pages.
- PyWB Remediation: Implementing targeted fixes for these top four error bins in PyWB (a widely used open-source web archiving system) reduced the aggregate fidelity violation rate from 50% down to 9%. Crucially, regression testing confirmed that these fixes did not break previously functional archived pages.
Technical Deep Dive
▶ Watch: Critical rendering path and limitations of screenshot comparisons (8:00)
To understand how Fedex achieves high-fidelity matching, one must examine the browser's critical rendering path, which consists of four primary stages:
- Network Fetching: Retrieving raw HTML, CSS, and script assets.
- Tree Construction: Building the DOM (Document Object Model) tree and the CSSOM (CSS Object Model) tree.
- Layout Construction: Combining the DOM and CSSOM trees into a layout tree that determines exact visual metrics and positioning for every element.
- Painting: Rendering the layout tree pixel by pixel onto the screen.
Standard QA tools operate exclusively at stage four (screenshots), where pixel differences make it impossible to distinguish between an intentional video animation and a broken, missing UI component. Fedex shifts inspection to stage three (layout tree matching). Across standard page loads, dynamic background elements like video players frequently alter pixel output while maintaining identical layout tree structures.
However, layout tree matching alone is insufficient for pages that modify their layout dynamically via script execution (such as a search bar implementing a typing animation). To handle this, Fedex introduces JavaScript write tracking.
When a script modifies the DOM or layout tree, Fedex intercepts and associates the specific DOM mutation with the exact line of JavaScript code that triggered it—recording its stack trace. Even if two pages exhibit differing layouts due to asynchronous timing variations, they can be reliably matched if they are driven by identical JavaScript write operations originating from the same stack trace. Fedex's core algorithmic engine combines layout tree matching with JavaScript write tracking to achieve robust, low-noise comparison between live web pages and their archived equivalents.
Experimental Setup & Results
▶ Watch: Layout tree matching and tracking JavaScript writes (10:00)
The authors evaluated Fedex using a large-scale dataset comprising 80,000 web pages sampled uniformly across the top 1 million websites (averaging 5 pages per site).
Two primary baselines were implemented for rigorous benchmarking:
- Screenshot Matching: A visual regression baseline mirroring commercial quality assurance tools like BrowserStack.
- Moire's Baseline: A logging-based baseline that tracks extra runtime errors encountered during archive loading compared to live web loading.
In detection evaluations, Fedex demonstrated the lowest positive report rate among tested metrics. By cross-referencing these reports against ground-truth manual validations, the authors confirmed that this lower rate stemmed directly from a dramatic drop in false positives. Fedex reduced false-positive rates by 50% relative to the Moire's baseline.
In diagnostic evaluations, root causes were extracted and clustered into error bins. The cumulative distribution function (CDF) of error groups demonstrated that approximately 50% of all broken pages fall into just the two most common error groups, and >60% are covered by the top four error groups. Applying targeted patches for these top four errors within PyWB successfully repaired 64% of the target pages fully, dropping the total system fidelity violation rate from 50% down to 9%.
Practical Implications
▶ Watch: Applying fixes to PyWB and conclusion (13:58)
For infrastructure teams, maintainers of open-source archiving software, and digital preservation librarians, these findings highlight the hidden pitfalls of automated web replay. Simply deploying a WARC replay server is insufficient; without active verification of JavaScript rewriting, a significant fraction of historical web content will degrade silently.
System builders can adopt the core principles of Fedex to build automated continuous integration (CI) pipelines for web archives. By bypassing pixel-level screenshot comparisons and instead auditing layout trees tied to JavaScript execution stack traces, platform operators can drastically reduce manual debugging overhead. Furthermore, the discovery that a small number of recurring rewrite errors account for the vast majority of archive failures indicates that engineering teams should prioritize systematic parser fixes for top-tier framework interactions rather than chasing one-off edge cases.
Key Takeaways
- The Archival Rewrite Problem: Replaying archived web pages requires rewriting embedded JavaScript to route sub-resource fetches through the archive host, but imperfect rewrites frequently cause missing content and broken UI functionality.
- Limitations of Naive QA: Screenshot-based visual comparison generates excessive false positives due to harmless animations, while raw console error logs miss silent functional failures.
- Critical Rendering Path Inspection: Fedex improves detection accuracy by evaluating intermediate rendering stages (layout trees) rather than final pixel output.
- Stack Trace Association: Tracking JavaScript write operations and their associated stack traces enables reliable element matching even when page layouts change dynamically.
- High Return on Targeted Fixes: Over 60% of all archive fidelity violations stem from just four primary error groups, allowing developers to repair large portions of digital archives with minimal targeted interventions.
About the Speaker(s)
The research was presented by Jingyuan Zhu, a researcher from the University of Michigan, in collaboration with co-authors Huanchen Sun and Harsha V. Madhyastha from the University of Southern California. The team focused on systems-level solutions for web preservation fidelity, combining browser rendering engine internals with automated debugging methodologies.
Reviews
→ Top-rated talks at 23rd USENIX Symposium on Networked Systems Design and Implementation (NSDI '26)
All talks from 23rd USENIX Symposium on Networked Systems Design and Implementation (NSDI '26)