2 ms·
It should be “free” with the right architecture, and it should be faster, that’s why I included it for the “perfect” framework list. However, it’s only a win o
by deno 9y ago
It should be “free” with the right architecture, and it should be faster, that’s why I included it for the “perfect” framework list.
However, it’s only a win on first page load on a subsequent visit. So definitely not a priority for an actual implementation.
BTW one easy way to implement this would be to flip the usual model:
1) Have service worker/server as main renderers
2) On navigation do a fetch to service worker and patch the page
So you’re on /main, do fetch to /page2?from=state and get patching instructions.
If you could give the service worker readonly access to DOM without copying this wouldn’t actually be that stupid.
It might be possible some day:
https://github.com/whatwg/dom/issues/270 https://github.com/whatwg/dom/issues/270