10 ms·
I would love to have a way to tell the browser "don't throw away the current DOM, Just apply the differences". It would work nicely in non-js page to make the e
by mrighele 9y ago
I would love to have a way to tell the browser "don't throw away the current DOM, Just apply the differences". It would work nicely in non-js page to make the experience smooth (and would probably work terribly if there was a lot of J's, of course)
- nojvek 9y agoThis. Every major client lib out there uses some variant of vdom. If this dom diffing was natively supported, browser would request with current dom hash and server could efficiently reply with a diff that both server and client can compute to be the same new hash. If it's forms. Client calls server with base hash + changes made by client and server replies with. Base hash + new diff to apply. The new diff includes validation changes. It's trees and diffs all the way down.
- pcmaffey 9y agoThis is exactly what React's virtual DOM does. Maybe the future is making the virtual DOM native to the browser? Bundle React with Chrome? Or how about a browser package manager that could cache and reuse all these common js libraries used on so many sites?
- discreditable 9y agoDecentralEyes does just that.
- grogs 9y agoSounds like PJAX.