3 ms·
This seems very similar to the system I came up with to reduce load times for JavaScript and CSS assets in Gate One a few years ago: https://github.com/liftoff
by riskable 11y ago
This seems very similar to the system I came up with to reduce load times for JavaScript and CSS assets in Gate One a few years ago:
https://github.com/liftoff/GateOne/blob/master/gateone/core/server.py#L2743 https://github.com/liftoff/GateOne/blob/master/gateone/core/...
Instead of letting the browser figure out which assets to load--using multiple GET requests--it delivers assets over the existing WebSocket connection and also caches those assets at the client in IndexedDB. So the client only ever has to download JavaScript/CSS assets once unless they change on the server (in which case they'll get re-synchronized automatically).
The mechanism loads much faster than allowing the client browser to perform all those (latency-unfriendly) GET requests. It is also superior to file concatenation since you can change any individual asset without having to worry about the impact of all clients having to re-download that one huge concatenated file.