4 ms·
> Even if you need to preserve client state between page loads (for e.g. music or video playback) you can let the browser do most of the heavy lifting by fetch(
by vyuh 6y ago
> Even if you need to preserve client state between page loads (for e.g. music or video playback) you can let the browser do most of the heavy lifting by fetch()ing a new page and replacing your content container at the DOM level.
Anyone knows of some easy to learn example of such DOM replacement?
- CameronNemo 6y agoTurbolinks does this from what I can tell.
- jimmaswell 6y agoWindow load events fail to fire this way among other likely problems. You'd have to specifically design around doing it, or do something else like put the whole page in an iframe with your video/music player staying floating outside, or put back inside when it's loaded.
- purerandomness 6y agoYes, look at the examples at https://htmx.org/ https://htmx.org/