DEV Community

Cover image for I built a Chrome extension because Ctrl+S breaks modern websites

I built a Chrome extension because Ctrl+S breaks modern websites

Winn Htut Hein on December 01, 2026

If you've ever done a Ctrl+S ("Save Page As") on a modern single page app to have a look at the layout or to save a copy for offline use you'll kno...
Collapse
 
userxnom profile image
Abdullah Naseer •

This is the exact pain I have hit with Ctrl+S on SPAs — an empty shell and broken asset paths, exactly as you describe. Capturing the live rendered DOM instead of the source HTML is the right call, and bundling everything into one ZIP makes it actually usable offline.

Two stress tests I would try if I were you: a React or Next.js app with lazy-loaded routes, to see whether chunks loaded after the first paint make it into the ZIP, and a page behind a login, where assets depend on a session cookie — that is where most save-page tools quietly break. Does the site-intel report flag assets that failed or needed auth?

Nice build, especially including the source maps — that is the part most tools skip. Which framework has given you the hardest time so far?

Collapse
 
john_carter_9a850136c0757 profile image
Winn Htut Hein •

Hey, thanks! Those are exactly the tests I should be running.

Lazy-loaded stuff: it scrolls the page and waits for things to settle first, then grabs anything the page loaded at runtime that nothing in the HTML points to (JS chunks, workers) and drops it in a runtime/ folder. Deep mode catches the most since it records the actual network traffic. Routes you haven't visited yet won't be in there, obviously.

Login pages: in Deep mode it reuses the files the browser already downloaded, so there's no second request to mess up the cookies. In normal mode it re-fetches with your session, which can still fail on stuff like SameSite cookies or one-time URLs.

And no, the site-intel report doesn't flag failed or auth-blocked assets right now. It's more about stuff extension devs care about (CSP, shadow roots, frames). The failures do get logged in capture-info.json with the error, like HTTP 401, plus an offline-readiness %. Putting that in the report is a good idea though, I'm stealing it.

Hardest framework? Honestly I haven't thrown a big Next.js app with lazy routes at it yet, so that's next on my list. If you try it before me, let me know what breaks!

Collapse
 
userxnom profile image
Abdullah Naseer •

That is a really clear answer, Winn — thank you for walking through each one. The Deep mode detail is the part that sticks with me: reusing the files the browser already downloaded, so there is no second request to mess up the cookies, is an elegant way around the login-page problem. And I like that the failures are already in capture-info.json with the HTTP 401 and the offline-readiness % — the report flag feels like a small step from there, not a new system.

Challenge accepted on the Next.js test. I will try a big Next.js app with lazy routes and report back what breaks first. If you had to pick the hardest version of that test, would you go for one with auth plus lazy routes, or a plain public app with lots of dynamically loaded chunks?

Thread Thread
 
john_carter_9a850136c0757 profile image
Winn Htut Hein •

I think I will pick Auth plus lazy routes, since it hits both weak spots at once. Try it in normal mode and Deep mode on the same page. If normal fails and Deep works, it's the re-fetch. Paste me a few lines from failedAssets in capture-info.json if anything breaks. Thanks for testing it!

Collapse
 
jan_sytze profile image
Jan Sytze Heegstra •

Save Page As on a single page app giving you an empty shell has annoyed me for years. The hard cases will be the ones you do not own, so other people's web apps are the best test set. I run TestMyBuild, where builders try each other's extensions on their own projects and write what failed. testmybuild.app

Collapse
 
john_carter_9a850136c0757 profile image
Winn Htut Hein •

Totally agree, other people's apps are the real test. TestMyBuild sounds like a great fit, I'll check it out. Thanks!

Collapse
 
jan_sytze profile image
Jan Sytze Heegstra •

Thanks, Winn. Paste the link to your extension on the home page and you will see your draft listing. If you get stuck anywhere, tell me here and I will look at it myself.

Collapse
 
robertpaschal profile image
Odinaka Robert Nnamani •

ctrl+s hands you the loader, not the page. a zip of the live dom with its assets is the snapshot that works offline.

Collapse
 
john_carter_9a850136c0757 profile image
Winn Htut Hein •

Exactly, you get the loader, not the page. That's the whole reason I built it. Thanks for reading!

Collapse
 
wrobeltomasz profile image
Tomasz •

Hi, does the ZIP capture client-side state (localStorage, IndexedDB) so a captured SPA actually rehydrates offline, or just the rendered DOM?

Collapse
 
john_carter_9a850136c0757 profile image
Winn Htut Hein •

Good question! Right now, no. It saves the rendered DOM plus assets. For storage, the site-intel report only lists what exists (localStorage/sessionStorage key names, IndexedDB database names), but it doesn't save the actual values or restore them offline. So an SPA that needs its stored state to boot may not fully rehydrate. Exporting that state is a good idea, though; I'm adding it to my list. Which app were you thinking of?