diff --git a/source b/source index 9155017c896..3363f3412ea 100644 --- a/source +++ b/source @@ -111623,6 +111623,19 @@ location.href = '#foo'; +
For each EventSource object eventSource whose
+ relevant global object's associated Document is
+ document, if eventSource's reconnect after back/forward cache
+ restoration flag is true, then set it to false and reestablish the
+ connection for eventSource.
This step ensures that any EventSource whose fetch was aborted
+ while the document was in the back/forward cache will attempt to
+ reconnect now that the document has been restored and is fully active
+ again.
Update the navigation API entries for reactivation given document's relevant global object's navigation API, entriesForNavigationAPI, and @@ -113221,6 +113234,36 @@ new PaymentRequest(…); // Allowed to use map of active timers.
Otherwise, for each EventSource object eventSource whose
+ relevant global object is equal to window, if there are any instances
+ of the fetch algorithm started for
+ eventSource:
Abort any instances of the fetch algorithm started + for eventSource.
Set eventSource's readyState attribute to CONNECTING.
Set eventSource's reconnect after back/forward cache + restoration flag to true.
This allows user agents to interrupt an ongoing EventSource
+ fetch when a Document is being stored in the back/forward
+ cache, without failing the connection or forcibly closing the
+ EventSource. Events that would have arrived while the document is in the
+ back/forward cache are not queued for later delivery. When the document is later
+ reactivated, any affected EventSource
+ will attempt to reconnect via its normal reestablish the connection
+ algorithm.
A last event ID string. This must initially be the empty string.
A reconnect after + back/forward cache restoration flag, which must initially be false.
Apart from url these are not currently exposed on
@@ -129168,6 +129214,18 @@ dictionary EventSourceInit {
data-x="queue a task">queued by EventSource objects is the remote event
task source.
When a Document becomes non-fully active because it is stored in
+ the back/forward cache, its EventSource connections
+ stop delivering events. The user agent can abort an ongoing instance of the fetch algorithm for an EventSource at that point;
+ doing so does not make the document unsalvageable. Events that would have arrived while the
+ document is in the back/forward cache are not queued for later delivery. When the document is
+ reactivated, any affected EventSource
+ can reconnect via the normal reestablish the connection algorithm (sending a
+ `Last-Event-ID` header if applicable).
If a user agent is to forcibly close an
EventSource object (this happens when a Document object goes away
- permanently), the user agent must abort any instances of the Document enters the back/forward
+ cache), the user agent must abort any instances of the fetch algorithm started for this EventSource object,
and must set the readyState attribute to CLOSED.