4 ms·
...which creates another problem with optimization: As soon as you make a change--no matter how small--to a single one of those concatenated assets you now hav
by riskable 12y ago
...which creates another problem with optimization: As soon as you make a change--no matter how small--to a single one of those concatenated assets you now have to deliver the entire new combined asset to the client. If you make changes to your JS/CSS assets on a regular basis (rapid iteration anyone?) this means your clients might be best served via individual assets (depending on your traffic patterns).
I have solved this problem myself by avoiding concatenation and using the browser's IndexedDB to store assets that can be loaded dynamically (JS, CSS, and client-side templates). Assets like this get downloaded over a WebSocket connection which provides the same advantage of SPDY in that no re-negotiation is necessary.
You can see the implementation of this here:
https://github.com/liftoff/GateOne/blob/master/gateone/core/server.py#L2736 https://github.com/liftoff/GateOne/blob/master/gateone/core/...
...and the client side code is here:
https://github.com/liftoff/GateOne/blob/master/gateone/static/gateone.js#L1450 https://github.com/liftoff/GateOne/blob/master/gateone/stati...
(Including the functions immediately following that one)