I wanna be able to stick
<script src="preloaded:jquery"></script> on my website and have it work. This basically involves bundling those libraries with the browser and having a registry somewhere of libraries browsers need to carry. Semantic versioning should be enforced, so an old webpage gets automatic XSS exploit protection as newer versions of libraries fix those exploits. This also has the added benefit that not only can the browser reuse/shared memory bytecode between webpages, significantly lowering RAM usage, they can also AOT-compile the libraries for even lower RAM usage and significant loading speedups.
- Increases website security
- Significantly speeds up loading (if implemented correctly)
- Significantly lowers RAM usage (if implemented correctly)
- Browsers need to implement it correctly if they wanna take full advantage of what this allows. Most browsers do already have a bytecode cache, which they could use for this, which would reduce loading times, but that won’t be enough for lowering RAM usage.