How indice works
indice runs ReplayWeb.page in WACZ-direct mode. Rather than reimplementing web replay on the server (URL rewriting, redirect handling, fuzzy matching, serving individual archived resources), indice hands the whole job to the wabac.js service worker running in the browser:
When you open a page for replay, the browser fetches the WACZ directly from GET /files/{id} using HTTP range requests, reads the CDX index embedded inside the WACZ, and serves every resource from the WARC records, all of it client-side. A Browsertrix crawl written into several WACZs is replayed from all of them, since a page’s stylesheets and scripts are often in another of the crawl’s files. During replay indice only serves bytes; its own work is search, metadata and the collection homepage.
Replay is served from an origin of its own: a second listener, on the next port on a workstation and on a hostname of its own on a server. The viewer page, with the banner and the notes panel, comes from indice’s origin and frames the replay. Archived pages run their own JavaScript, and from the replay origin that script cannot reach indice’s API as the reader or reach into the viewer around it. The replay listener serves the player and the archive bytes and nothing else: no writes, no pages, no sign-in.
You can also replay a whole collection at once (from the homepage card or the collection page): GET /collection/{id}/replay.json hands wabac.js a multi-WACZ manifest listing every member crawl, so a link from one crawl to a page archived in another crawl of the same collection resolves on demand. That resolution is answered from the search index via GET /collection/{id}/pages which also feeds the viewer’s page-list sidebar, so the browser never has to load every member’s index. Resolution is scoped to the collection, and page sub-resources always come from the page’s own crawl, preserving per-page temporal coherence.
See DESIGN.md for the full architecture.
How indexing reads a WACZ
Section titled “How indexing reads a WACZ”By default indice reads a WACZ through its internal CDX index, fetching only the records that become pages (HTML, PDFs, and Browsertrix’s rendered urn:text) and skipping images, video, JS, and CSS. It also reads the fully rendered page text from pages/pages.jsonl and pages/extraPages.jsonl since many crawls store the post-JS text only there. That way JS-rendered content is searchable as well as visible in replay. Local and remote WACZs go through the same path and differ only in how indice reads the bytes: a remote WACZ over HTTP range requests (no download), a local WACZ straight from the file.
It falls back to a full scan of every WARC record only when a WACZ can’t be read via its CDX: its WARCs are stored compressed (the WACZ spec says the archive/ WARCs should be stored uncompressed so they can be read by offset; a few tools don’t), or it has no readable CDX. For a remote WACZ whose host doesn’t support range requests, the fallback downloads a temporary copy and scans it.
indice trusts the CDX because replay already does: the in-browser player resolves each record through the CDX, so a WACZ with a broken CDX wouldn’t replay anyway. Indexing from the same index keeps the two consistent.
Discovery and provenance
Section titled “Discovery and provenance”In a “reading room” you can find things in an archive and understand what you’re looking at, as well as replay a URL you already know. Two findings from web-archiving research shape indice (both expanded, with citations, in DESIGN.md):
- Web-archive use is mostly navigational and temporal: seeing a page or site as it was, or how it changed over time (Costa & Silva’s query-log study of the Portuguese Web Archive). So time is a first-class axis, and facets beat one long scrolling list as an archive grows. indice has a faceted results page (collection, site, date, type, language), a month timeline, and grouping of repeat captures of the same URL. This is the faceted, full-text “slice and dice” browsing that SHINE (UK Web Archive) and SolrWayback (Royal Danish Library) established over the warc-indexer. indice owes both a clear debt, and swaps their Solr backend for a single embedded Tantivy index, so there is no cluster to operate.
- Provenance is part of the record: to trust and interpret an archive you need to know how it was made, including the crawler software, operator, dates, and seeds (Maemura et al., If These Crawls Could Talk). indice reads this from the WACZ and WARC and surfaces it on each collection and WACZ.