<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.whatwg.org/index.php?action=history&amp;feed=atom&amp;title=Foreign_Fetch</id>
	<title>Foreign Fetch - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.whatwg.org/index.php?action=history&amp;feed=atom&amp;title=Foreign_Fetch"/>
	<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Foreign_Fetch&amp;action=history"/>
	<updated>2026-04-17T19:26:00Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Foreign_Fetch&amp;diff=9966&amp;oldid=prev</id>
		<title>Annevk: /* Modifications to Fetch */</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Foreign_Fetch&amp;diff=9966&amp;oldid=prev"/>
		<updated>2015-07-19T17:43:48Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Modifications to Fetch&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 17:43, 19 July 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l6&quot;&gt;Line 6:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 6:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;On the face of it, it seems step 3, substep 5, of https://fetch.spec.whatwg.org/#http-fetch, needs modifications to check for a foreign fetch enabled service worker before going to the cache/network.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;On the face of it, it seems step 3, substep 5, of https://fetch.spec.whatwg.org/#http-fetch, needs modifications to check for a foreign fetch enabled service worker before going to the cache/network.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;There also needs to be some kind of limit imposed so you can&#039;t get infinitely nested service workers (or loops). What exactly is best here is unclear.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== API ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== API ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Annevk</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Foreign_Fetch&amp;diff=9959&amp;oldid=prev</id>
		<title>Annevk: Created page with &quot;This is a proposal for invoking service workers for requests that are same-origin with the service worker fetched from cross-origin clients.  == Modifications to Fetch ==  ......&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Foreign_Fetch&amp;diff=9959&amp;oldid=prev"/>
		<updated>2015-07-07T10:09:45Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;This is a proposal for invoking service workers for requests that are same-origin with the service worker fetched from cross-origin clients.  == Modifications to Fetch ==  ......&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This is a proposal for invoking service workers for requests that are same-origin with the service worker fetched from cross-origin clients.&lt;br /&gt;
&lt;br /&gt;
== Modifications to Fetch ==&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
On the face of it, it seems step 3, substep 5, of https://fetch.spec.whatwg.org/#http-fetch, needs modifications to check for a foreign fetch enabled service worker before going to the cache/network.&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;[Constructor (DOMString type, optional ForeignFetchEventInit eventInitDict),&lt;br /&gt;
 Exposed=ServiceWorker]&lt;br /&gt;
interface ForeignFetchEvent : ExtendableEvent {&lt;br /&gt;
  readonly attribute Request request;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
dictionary ForeignFetchEventInit : ExtendableEventInit {&lt;br /&gt;
  required Request request;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
partial interface ServiceWorkerRegistration {&lt;br /&gt;
  Promise&amp;lt;void&amp;gt; enableForeignFetch();&lt;br /&gt;
  Promise&amp;lt;void&amp;gt; disableForeignFetch();&lt;br /&gt;
);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: We cannot extend FetchEvent because that exposes client and messaging functionality which might lead to security issues since current practice is all same-origin messaging when it comes to service workers.&lt;br /&gt;
&lt;br /&gt;
== Link header ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Link:&amp;lt;/sw.js&amp;gt;;rel=serviceworker;scope=/;handles=fetch,foreignfetch,push&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Annevk</name></author>
	</entry>
</feed>