@dosaygo It does not fetch them later. The page's content security policy allows scripts only from the package itself, in every tier, so a script from a CDN never loads, online or offline. A page that needs a library has to carry it: put the file in the app folder next to index.html, or inline it. Images and fonts in desktop and full can come from hosts listed in allowedHosts, but those need the network, so for offline use they belong in the folder too. Today install does not download remote files into the package.
Thanks for the detail on enforcing a package-only script CSP and noting that remote images, fonts, and external assets have to be bundled locally for offline use since install does not fetch them into the package today, I'm building TDF (Tree Document Format), which captures live web pages alongside their rendered assets, comments, and notes into a single self-contained offline file that stays browsable without the network: trees.dosaygo.com/go/forum-2026112...
@dosaygo That fits the gap well: a page captured with its assets already inside is what an offline app needs. In deskhatch a fetch of a file inside the package works in every tier, so assets written next to the page would load. How does TDF handle scripts that load other files at run time, a dynamic import or a fetch of a JSON file? Those are the ones a static capture usually misses.
Thanks for asking. Tree-grower uses WebDriver BiDi interception at network.responseStarted in the live browser to read and store responses the browser receives during the capture session in the .tdf SQLite archive. That includes dynamic import() modules, fetch/XHR JSON, and assets triggered while browsing or driving with Grip under --keep-open; Tree Player can replay them offline. Paths not requested during the session are not pre-crawled, so exercise them while capturing. What are you hoping to archive?
@dosaygo Not an archive as such. The case I have in mind is a page someone built once and wants to keep using without a network. In deskhatch that page becomes a folder of three files, and the Pomodoro example installs as 20 KB, so a captured page with its responses could fit the same shape. Does Tree Player look up each response by its original URL in the SQLite file? If so, exporting those responses as plain files keyed by path could turn a .tdf capture into an app folder.
@the_daily_flare The package is the same on Linux: the same three files, app.json, index.html and icon.png, about 10 KB of content, so it takes about the same space. The launcher is where Linux is lighter. On a Mac it is a 148 KB app bundle in Applications; on Linux it is one small text file, a .desktop entry in ~/.local/share/applications, plus a copy of the icon, and the runtime then calls update-desktop-database so the menu picks it up. The 0.47 seconds I measured only on a Mac, so I can't give you a Linux number yet. Which desktop are you on, GNOME, KDE or something else, and does the app show up in the menu right after install there?
We're a place where coders share, stay up-to-date and grow their careers.
When an HTML app depends on remote scripts or assets, how do you make sure the installed copy still works offline later?
@dosaygo It does not fetch them later. The page's content security policy allows scripts only from the package itself, in every tier, so a script from a CDN never loads, online or offline. A page that needs a library has to carry it: put the file in the app folder next to index.html, or inline it. Images and fonts in desktop and full can come from hosts listed in allowedHosts, but those need the network, so for offline use they belong in the folder too. Today install does not download remote files into the package.
Thanks for the detail on enforcing a package-only script CSP and noting that remote images, fonts, and external assets have to be bundled locally for offline use since install does not fetch them into the package today, I'm building TDF (Tree Document Format), which captures live web pages alongside their rendered assets, comments, and notes into a single self-contained offline file that stays browsable without the network: trees.dosaygo.com/go/forum-2026112...
@dosaygo That fits the gap well: a page captured with its assets already inside is what an offline app needs. In deskhatch a fetch of a file inside the package works in every tier, so assets written next to the page would load. How does TDF handle scripts that load other files at run time, a dynamic import or a fetch of a JSON file? Those are the ones a static capture usually misses.
Thanks for asking. Tree-grower uses WebDriver BiDi interception at network.responseStarted in the live browser to read and store responses the browser receives during the capture session in the .tdf SQLite archive. That includes dynamic import() modules, fetch/XHR JSON, and assets triggered while browsing or driving with Grip under --keep-open; Tree Player can replay them offline. Paths not requested during the session are not pre-crawled, so exercise them while capturing. What are you hoping to archive?
@dosaygo Not an archive as such. The case I have in mind is a page someone built once and wants to keep using without a network. In deskhatch that page becomes a folder of three files, and the Pomodoro example installs as 20 KB, so a captured page with its responses could fit the same shape. Does Tree Player look up each response by its original URL in the SQLite file? If so, exporting those responses as plain files keyed by path could turn a .tdf capture into an app folder.
Would I still get a 20 KB Pomodoro install in 0.47 seconds on Linux, or is that Mac only?
@the_daily_flare The package is the same on Linux: the same three files, app.json, index.html and icon.png, about 10 KB of content, so it takes about the same space. The launcher is where Linux is lighter. On a Mac it is a 148 KB app bundle in Applications; on Linux it is one small text file, a .desktop entry in ~/.local/share/applications, plus a copy of the icon, and the runtime then calls update-desktop-database so the menu picks it up. The 0.47 seconds I measured only on a Mac, so I can't give you a Linux number yet. Which desktop are you on, GNOME, KDE or something else, and does the app show up in the menu right after install there?