From: John Barton [mailto:[email protected]] 

> But the push scenario in your first paragraph would not use the cache either.

Yeah, that's what I was alluding to with the "most naïve" comment.

>  one or the other has to send its information at the outset of a import 
>request, or 

One way of doing this I came up with off the top of my head is to add some kind 
of "dependency graph version" or hash to the query string. I.e. <script 
type="module" src="entry.js?1234"></script>. The server can then assume that 
the client has in its cache version 1234 of the dependency graph, and can push 
the incremental updates since then (i.e. added or modified files). If parts of 
the cache were evicted, so that the versioning signal is not entirely accurate, 
then the penalty is not so bad, as you just fall back to the normal loading 
process for the evicted subset.

But I feel pretty silly speculating here as I'm not an expert on HTTP/2 
techniques, and there are probably other methods that are better in various 
ways.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to