Re: [whatwg/fetch] HTTP cache partitioning (#943)

@shivanigithub commented on this pull request.



> @@ -2050,6 +2050,34 @@ clearly stipulates that <a>connections</a> are keyed on
      WebSocket saner -->
 
 
+<h3 id=http-cache-partitions>HTTP cache partitions</h3>
+
+<p>To
+<dfn lt="determine the HTTP cache partition|determining the HTTP cache partition">determine the HTTP cache partition</dfn>,
+given <var>request</var>, run these steps:
+
+<ol>
+ <li><p>If <var>request</var> is a <a>navigation request</a>, set <var>environmentSettings</var> to
+ <var>request</var>'s <a for="environment">target browsing context</a>'s <a>active document</a>'s
+ <a>environment settings object</a>. Otherwise let <var>environmentSettings</var> be
+ <var>request</var>'s <a for=request>client</a>.

And that's because the active document is not yet set and will be set after this fetch, right? 

Then another option could be to only special case the main frame's navigation fetch request and not the iframe's, since iframe navigation request's partitioning key is the same as that of a subresource in the main frame.
And if we are only special casing the main frame navigation request then we could use the creation URL's origin, I guess. Does that make sense?



-- 
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/pull/943#discussion_r408879133

Received on Wednesday, 15 April 2020 14:20:20 UTC