Re:Managing Async Dependencies with JavaScript
by z3t4 on Sunday May 21, 2017 @03:14PM
(#14388696)
It's up to the browser to optimize. What I've discovered so far is that push has low priority and that if a script is required while it's being downloaded (pushed), the browser (chrome) downloads it twice. The browser could however be smart about it and just make the required script top priority and only download it once. The browser could also parse the pushed scripts (chrome currently doesn't) if the cpu is idle. This opens up for modules on the web, like in Node.JS, but without the latency penalty. Also there is no need for the browser to pre-parse the scripts to look for modules when they are already pushed.
[ Parent
| on HN ]
There are no comments on this comment yet.