Re: [whatwg/fetch] Define the "Preload Cache" (#590)

> > > Preload (IMO) should be roughly equivalent to asking the document whether it currently has a `<link rel="preload">` in the DOM and querying that element for its response,
> > 
> > 
> > I like that. It makes it pretty easy to explain the scope of preloading to developers. Although, you'd need to figure out the behaviour of multiple preload elements in the same page with the same url etc.
> 
> I'm imagining something like a ref-counted list of unique URLs.
> 

Though maybe a more accurate to define it would be to get the response from the last `link rel=preload` element in the document that has the same URL (and crossoriginess etc). This would make it more explicit in the case where calls to the same non-cacheable URL can produce different results - you know that your resource would always try to query the response from the last link added (in document order).

This is also quite doable in terms of WPT.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/590#issuecomment-925706487

Received on Thursday, 23 September 2021 10:57:54 UTC