4 ms·
What do you mean? Browsers do serialise the actual DOM. I know this because I once saved a JS-heavy page and when I loaded it back into the browser, I discover
by thristian 9y ago
What do you mean? Browsers do serialise the actual DOM.
I know this because I once saved a JS-heavy page and when I loaded it back into the browser, I discovered the JS-generated menus were already present in the source and were re-generated by the JS each time the page loaded.
- finchisko 9y ago>re-generated by the JS each time the page loaded. yes, regenerated because js files are also stored. So the menu generating functions and all constants needed to generate menus were probably present in downloaded js files. But imagine, site that is also fetching data via ajax and render that data somehow. When you save and then reopen saved page, you might not get exact state as you were in time of saving. There are many reason why state would be different (you could be logged off, etc...) So if you send saved page to somebody, he/she will see different state of page than you. All of this could be eliminated if browsers saved state of DOM instead of page source code (and js,css resources).