r/DataHoarder • u/Imran_Hossen_Piash • 7d ago
Discussion Why do modern JavaScript websites become so difficult to archive properly?
3
Upvotes
r/DataHoarder • u/Imran_Hossen_Piash • 7d ago
2
u/CONSOLE_LOAD_LETTER 6d ago
WACZ via archiveweb.page browser plugin recording then replay via standalone offline local replayweb.page has been the most reliable and accurate way to archive and preserve javascript-heavy pages in my experience. It's still not perfect on all sites though.
Both tools are open source so you can have a look at what they are doing under the hood, and even fork them if you wanted to. Or maybe contribute to those projects yourself to help build upon them: https://github.com/webrecorder
2
u/Exact_Wrongdoer9018 5d ago
The gap you are hitting is not "HTML plus assets". It is that wget and HTTrack model a site as a URL graph, and a React/Next site is not one. Three failure modes I keep running into:
To your second question: WARC/WACZ, not a browsable mirror. In a replay that serves archived responses back to the page through a service worker, the original JS still runs and its own fetch calls get answered, so client-side routing survives. A mirror rewritten by wget --convert-links breaks exactly there.
Frequently changing pages: I snapshot on diff, not on a timer. Hash the canonical HTML plus the API responses, and only write a new capture when the hash moves. Each capture gets a sha256 sidecar, and I verify the previous one still parses before pruning it, because a truncated gzip record in a WARC fails silently and you only find out during a restore.
Honest limit: canvas or WebGL dashboards never replay right for me. For those I keep a screenshot pair next to the WARC and label it as a fallback rather than pretend the capture is complete.
2
u/Itsthejoker ~50TB Usable 6d ago
Blame AI companies. They scraped so hard that they ruined it for everyone.