HeadlinesBriefing favicon HeadlinesBriefing.com

Kage Tool Creates JavaScript-Free Offline Website Archives

Hacker News •
×

Developer tamnd released kage, a command-line tool that clones entire websites into browsable offline folders while completely stripping JavaScript. The utility renders pages in headless Chrome, captures the final DOM state, then removes all scripts and downloads assets locally. Users get clean HTML files that work without network calls, solving the common problem of saved web pages breaking months later.

The tool respects robots.txt and sitemaps during its breadth-first crawl, with options to limit pages, depth, and scope. It handles lazy-loaded images through auto-scrolling and supports subdomain crawling. kage operates idempotently, avoiding duplicate fetches even when URLs vary slightly, and can resume interrupted crawls. Installation requires Chrome/Chromium on the host system, though a container image bundles everything needed.

Beyond folder-based mirrors, kage packs archives into ZIM format for compatibility with the Kiwix offline reader ecosystem. Alternatively, users can create self-contained binary executables that serve the archived site without any dependencies. This approach produces shareable files that open decades later, regardless of the original site's fate.

For developers and researchers needing reliable offline access to web content, kage offers a practical solution that treats web pages as finished documents rather than active code. The tool transforms the fragile web archive problem into a solved one.