Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Editorial review: Add docs for notRestoredReasons #32920

Merged
merged 69 commits into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
7fa1cdf
Adds docs for notRestoredReasons
chrisdavidmills Jul 14, 2023
79a4efb
Merge branch 'main' into notrestoredreasons
chrisdavidmills Jul 17, 2023
e039269
Update files/en-us/web/api/performance_api/reporting_backforward_cach…
chrisdavidmills Jul 17, 2023
3c288fb
Update files/en-us/web/api/performance_api/reporting_backforward_cach…
chrisdavidmills Jul 17, 2023
2779495
Making fixes for review comments from tunetheweb and Josh-Cena
chrisdavidmills Jul 17, 2023
55dcabe
Merge branch 'main' into notrestoredreasons
chrisdavidmills Jul 17, 2023
b3640fd
Add explainer link
chrisdavidmills Jul 17, 2023
4210490
Merge branch 'notrestoredreasons' of github.com:chrisdavidmills/conte…
chrisdavidmills Jul 17, 2023
9bd464a
Merge branch 'main' into notrestoredreasons
chrisdavidmills Jul 20, 2023
827ee71
Merge branch 'main' into notrestoredreasons
chrisdavidmills Oct 10, 2023
bc5cd31
Add content to explain NotRestoredReasons empty cases
chrisdavidmills Oct 10, 2023
fa9b2b1
Make small change to regenerate preview pages
chrisdavidmills Mar 21, 2024
7dc4028
Update content for final implementation of notRestoredReasons
chrisdavidmills Mar 27, 2024
30a8cfb
Merge branch 'main' into notrestoredreasons
chrisdavidmills Mar 27, 2024
4e5e37e
Fixes for tunetheweb review comments
chrisdavidmills Mar 29, 2024
b9c2066
Merge branch 'main' into notrestoredreasons
chrisdavidmills Mar 29, 2024
c3418d4
Update files/en-us/web/api/notrestoredreasons/index.md
chrisdavidmills Apr 5, 2024
0ef8e2a
Update files/en-us/web/api/notrestoredreasondetails/index.md
chrisdavidmills Apr 5, 2024
8849f1d
Update files/en-us/web/api/notrestoredreasons/index.md
chrisdavidmills Apr 5, 2024
f927124
Update files/en-us/web/api/performancenavigationtiming/index.md
chrisdavidmills Apr 5, 2024
e0bb956
Update files/en-us/web/api/notrestoredreasons/tojson/index.md
chrisdavidmills Apr 5, 2024
c7613a0
Update files/en-us/web/api/notrestoredreasondetails/tojson/index.md
chrisdavidmills Apr 5, 2024
e097dea
Merge branch 'main' into notrestoredreasons
chrisdavidmills Apr 5, 2024
46ebe06
Fix linter errors
chrisdavidmills Apr 5, 2024
2d38733
Update files/en-us/web/api/performance_api/reporting_backforward_cach…
chrisdavidmills Apr 10, 2024
a078e52
Update files/en-us/web/api/performance_api/reporting_backforward_cach…
chrisdavidmills Apr 10, 2024
2a39a6e
Update files/en-us/web/api/performance_api/reporting_backforward_cach…
chrisdavidmills Apr 10, 2024
b3a0250
Update files/en-us/web/api/performance_api/reporting_backforward_cach…
chrisdavidmills Apr 10, 2024
27eb90b
Update files/en-us/web/api/performance_api/reporting_backforward_cach…
chrisdavidmills Apr 10, 2024
bd377c7
Update files/en-us/web/api/performance_api/index.md
chrisdavidmills Apr 10, 2024
60023a4
Update files/en-us/web/api/performance_api/reporting_backforward_cach…
chrisdavidmills Apr 10, 2024
f1ee3b8
Update files/en-us/web/api/performance_api/reporting_backforward_cach…
chrisdavidmills Apr 10, 2024
4b421c2
Update files/en-us/web/api/performancenavigationtiming/notrestoredrea…
chrisdavidmills Apr 10, 2024
ea861dd
Update files/en-us/web/api/performancenavigationtiming/notrestoredrea…
chrisdavidmills Apr 10, 2024
dcc0ccc
Update files/en-us/web/api/performancenavigationtiming/index.md
chrisdavidmills Apr 10, 2024
d11b03e
Update files/en-us/web/api/notrestoredreasons/reasons/index.md
chrisdavidmills Apr 10, 2024
5848e1d
Update files/en-us/web/api/notrestoredreasons/index.md
chrisdavidmills Apr 10, 2024
db1f261
Update files/en-us/web/api/notrestoredreasondetails/reason/index.md
chrisdavidmills Apr 10, 2024
a1f52cb
Update files/en-us/web/api/notrestoredreasondetails/reason/index.md
chrisdavidmills Apr 10, 2024
aa279ef
Update files/en-us/web/api/notrestoredreasondetails/index.md
chrisdavidmills Apr 10, 2024
cb23c7b
Update files/en-us/web/api/performance_api/reporting_backforward_cach…
chrisdavidmills Apr 10, 2024
34c5dff
Merge branch 'main' into notrestoredreasons
chrisdavidmills Apr 10, 2024
f025cb6
Fixes for Elchi3 review comments, bfcache glossary entry added
chrisdavidmills Apr 10, 2024
16c1f37
Update files/en-us/glossary/bfcache/index.md
chrisdavidmills Apr 12, 2024
afc07ae
Update files/en-us/web/api/notrestoredreasondetails/index.md
chrisdavidmills Apr 12, 2024
c770fde
Update files/en-us/web/api/notrestoredreasondetails/reason/index.md
chrisdavidmills Apr 12, 2024
ccb6a3c
Update files/en-us/web/api/notrestoredreasondetails/tojson/index.md
chrisdavidmills Apr 12, 2024
4615641
Update files/en-us/web/api/performancenavigationtiming/notrestoredrea…
chrisdavidmills Apr 12, 2024
9d9e159
Update files/en-us/web/api/notrestoredreasons/src/index.md
chrisdavidmills Apr 12, 2024
1576c7b
Update files/en-us/web/api/notrestoredreasondetails/reason/index.md
chrisdavidmills Apr 12, 2024
f138aa9
Update files/en-us/web/api/notrestoredreasons/url/index.md
chrisdavidmills Apr 12, 2024
1154a0b
Update files/en-us/web/api/notrestoredreasons/tojson/index.md
chrisdavidmills Apr 12, 2024
6cced22
Update files/en-us/web/api/notrestoredreasons/url/index.md
chrisdavidmills Apr 12, 2024
b680b17
Update files/en-us/web/api/notrestoredreasons/children/index.md
chrisdavidmills Apr 12, 2024
1254e86
Update files/en-us/web/api/notrestoredreasons/children/index.md
chrisdavidmills Apr 12, 2024
ae17c03
Update files/en-us/web/api/notrestoredreasons/src/index.md
chrisdavidmills Apr 12, 2024
5687f85
Update files/en-us/web/api/notrestoredreasons/id/index.md
chrisdavidmills Apr 12, 2024
a492d33
Update files/en-us/web/api/notrestoredreasons/id/index.md
chrisdavidmills Apr 12, 2024
c1b7a89
Update files/en-us/web/api/notrestoredreasons/index.md
chrisdavidmills Apr 12, 2024
31f8220
Update files/en-us/web/api/notrestoredreasons/reasons/index.md
chrisdavidmills Apr 12, 2024
d1b4736
Update files/en-us/web/api/notrestoredreasons/reasons/index.md
chrisdavidmills Apr 12, 2024
e3d87da
Update files/en-us/web/api/notrestoredreasons/index.md
chrisdavidmills Apr 12, 2024
5abb2b3
Update files/en-us/web/api/notrestoredreasons/name/index.md
chrisdavidmills Apr 12, 2024
07c7417
Update files/en-us/web/api/notrestoredreasons/name/index.md
chrisdavidmills Apr 12, 2024
5398fcc
Update files/en-us/web/api/notrestoredreasons/reasons/index.md
chrisdavidmills Apr 12, 2024
a80b30b
Merge branch 'main' into notrestoredreasons
chrisdavidmills Apr 12, 2024
90bc4f6
fix broken link
chrisdavidmills Apr 12, 2024
c0de6c8
Merge branch 'notrestoredreasons' of github.com:chrisdavidmills/conte…
chrisdavidmills Apr 12, 2024
c62199d
Add CC attribution note
chrisdavidmills Apr 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixes for tunetheweb review comments
  • Loading branch information
chrisdavidmills committed Mar 29, 2024
commit 4e5e37e3c02438e114f7763fdc5809db0ec04e0b
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ A string.

There are many different reasons why blocking could occur, and browsers can choose to implement their own specific reasons for blocking, based on how they operate. Developers should avoid depending on specific wording for reasons and be prepared to handle new reasons being added and deleted.

The values listed in the specification are:
The initial values listed in the specification are:

- `"fetch"`
- : While unloading, a fetch initiated by the current document (e.g. via {{domxref("fetch()")}}) was canceled while ongoing. As a result, the page was not in a stable state that could be stored in the bfcache.
Expand All @@ -36,7 +36,7 @@ The values listed in the specification are:
- `"websocket"`
- : While unloading, an open [WebSocket](/en-US/docs/Web/API/WebSockets_API) connect was shut down, so the page was not in a stable state that could be stored in the bfcache.

Chrome implements the following additional blocking reasons (among others):
Additional blocking reasons may be used by some browsers, for example:

- `"unload-listener"`
- : The page registers an [`unload`](/en-US/docs/Web/API/Window/unload_event) handler, which prevents bfcache usage. This serves as a useful warning, as `unload` is deprecated. See [Deprecating the unload event](https://developer.chrome.com/docs/web-platform/deprecating-unload) for more information.
chrisdavidmills marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/api/notrestoredreasons/children/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ browser-compat: api.NotRestoredReasons.children
{{APIRef("Performance API")}}{{SeeCompatTable}}

The **`children`** read-only property of the
{{domxref("NotRestoredReasons")}} interface returns an array of {{domxref("NotRestoredReasons")}} objects representing the blocked state of any child {{htmlelement("iframe")}}s embedded in the current document.
{{domxref("NotRestoredReasons")}} interface returns an array of {{domxref("NotRestoredReasons")}} objects, one for each child {{htmlelement("iframe")}} embedded in the current document, which may contain reasons why the top-level frame was blocked relating to the child frames.

Each object has the same structure as the parent object — this way, any number of levels of embedded `<iframes>` can be represented inside the object recursively.
Each object has the same structure as the parent object — this way, any number of levels of embedded `<iframe>`s can be represented inside the object recursively.

## Value

Expand Down
6 changes: 3 additions & 3 deletions files/en-us/web/api/notrestoredreasons/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ browser-compat: api.NotRestoredReasons

{{APIRef("Performance API")}}{{SeeCompatTable}}

The **`NotRestoredReasons`** interface of the {{domxref("Performance API", "Performance API", "", "nocode")}} provides report data on whether frames present in the current document were blocked from using the [back/forward cache (bfcache)](https://web.dev/articles/bfcache) on navigation, and why.
The **`NotRestoredReasons`** interface of the {{domxref("Performance API", "Performance API", "", "nocode")}} provides report data containing reasons why the current document was blocked from using the [back/forward cache (bfcache)](https://web.dev/articles/bfcache) on navigation.
chrisdavidmills marked this conversation as resolved.
Show resolved Hide resolved

These objects are accessed via the {{domxref("PerformanceNavigationTiming.notRestoredReasons")}} property.

## Instance properties

- {{domxref("NotRestoredReasons.children", "children")}} {{ReadOnlyInline}} {{Experimental_Inline}}
- : An array of {{domxref("NotRestoredReasons")}} objects representing the blocked state of any child {{htmlelement("iframe")}}s embedded in the current document. Each object has the same structure as the parent object — this way, any number of levels of embedded `<iframe>s` can be represented inside the object recursively. If the frame has no children, the array will be empty; if the document is in a cross-origin `<iframe>`, `children` will return `null`.
- : An array of {{domxref("NotRestoredReasons")}} objects, one for each child {{htmlelement("iframe")}} embedded in the current document, which may contain reasons why the top-level frame was blocked relating to the child frames. Each object has the same structure as the parent object — this way, any number of levels of embedded `<iframe>`s can be represented inside the object recursively. If the frame has no children, the array will be empty; if the document is in a cross-origin `<iframe>`, `children` will return `null`.
chrisdavidmills marked this conversation as resolved.
Show resolved Hide resolved
- {{domxref("NotRestoredReasons.id", "id")}} {{ReadOnlyInline}} {{Experimental_Inline}}
- : A string representing the `id` attribute value of the `<iframe>` the document is contained in (for example `<iframe id="foo" src="...">`). If the document is not in an `<iframe>` or the `<iframe>` has no `id` set, `id` will return `null`.
- {{domxref("NotRestoredReasons.name", "name")}} {{ReadOnlyInline}} {{Experimental_Inline}}
- : A string representing the `name` attribute value of the `<iframe>` the document is contained in (for example `<iframe name="bar" src="...">`). If the document is not in an `<iframe>` or the `<iframe>` has no `name` set, `name` will return `null`.
- {{domxref("NotRestoredReasons.reasons", "reasons")}} {{ReadOnlyInline}} {{Experimental_Inline}}
- : An array of {{domxref("NotRestoredReasonDetails")}} objects, each representing a reason why the navigated page was blocked from using the bfcache. If the document is in a cross-origin `<iframe>`, `reasons` will return `null`.
- : An array of {{domxref("NotRestoredReasonDetails")}} objects, each representing a reason why the navigated page was blocked from using the bfcache. If the document is in a cross-origin `<iframe>`, `reasons` will return `null`, but the parent document may show a `reason` of `"masked"` if any `<iframe>`s blocked bfcache usage for the top-level frame.
- {{domxref("NotRestoredReasons.src", "src")}} {{ReadOnlyInline}} {{Experimental_Inline}}
- : A string representing the path to the source of the `<iframe>` the document is contained in (for example `<iframe src="exampleframe.html">`). If the document is not in an `<iframe>`, `src` will return `null`.
- {{domxref("NotRestoredReasons.url", "url")}} {{ReadOnlyInline}} {{Experimental_Inline}}
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/notrestoredreasons/reasons/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The **`reasons`** read-only property of the

An array of {{domxref("NotRestoredReasonDetails")}} objects. See [Blocking reasons](/en-US/docs/Web/API/Performance_API/Reporting_backforward_cache_not_restored_reasons#blocking_reasons) for a list of the possible blocking reasons.
chrisdavidmills marked this conversation as resolved.
Show resolved Hide resolved

If the document is in a cross-origin {{htmlelement("iframe")}}, `reasons` will return `null`.
If the document is in a cross-origin {{htmlelement("iframe")}}, `reasons` will return `null`, but the parent document may show a `reason` of `"masked"` if any `<iframe>`s blocked bfcache usage for the top-level frame.

## Examples

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/performance_api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ The following guides help you to understand key concepts of the Performance API
- [Navigation timing](/en-US/docs/Web/API/Performance_API/Navigation_timing): Measuring navigation timing of a document.
- [User timing](/en-US/docs/Web/API/Performance_API/User_timing): Measuring and recording performance data custom to your application.
- [Server timing](/en-US/docs/Web/API/Performance_API/Server_timing): Collecting server-side metrics.
- [Reporting back/forward cache not restored reasons](/en-US/docs/Web/API/Performance_API/Reporting_backforward_cache_not_restored_reasons): Reporting on whether frames present in the document were blocked from using the [back/forward cache](https://web.dev/bfcache/) (bfcache), and why.
- [Reporting back/forward cache not restored reasons](/en-US/docs/Web/API/Performance_API/Reporting_backforward_cache_not_restored_reasons): Reporting on why the current document was blocked from using the [back/forward cache](https://web.dev/bfcache/) (bfcache).
chrisdavidmills marked this conversation as resolved.
Show resolved Hide resolved
Elchi3 marked this conversation as resolved.
Show resolved Hide resolved

## Specifications

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ browser-compat: api.PerformanceNavigationTiming.notRestoredReasons

{{DefaultAPISidebar("Performance API")}}{{SeeCompatTable}}

The {{domxref("PerformanceNavigationTiming.notRestoredReasons")}} property reports information on whether frames present in the document were blocked from using the [back/forward cache](https://web.dev/bfcache/) (bfcache) on navigation, and why. Developers can use this information to identify pages that need updates to make them bfcache-compatible, thereby improving site performance.
The {{domxref("PerformanceNavigationTiming.notRestoredReasons")}} property reports information on why the current document was blocked from using the [back/forward cache (bfcache)](https://web.dev/bfcache/) on navigation. Developers can use this information to identify pages that need updates to make them bfcache-compatible, thereby improving site performance.
chrisdavidmills marked this conversation as resolved.
Show resolved Hide resolved
Elchi3 marked this conversation as resolved.
Show resolved Hide resolved

## Concepts and usage
Elchi3 marked this conversation as resolved.
Show resolved Hide resolved

Modern browsers provide an optimization feature for history navigation called the [back/forward cache](https://web.dev/bfcache/) (bfcache). This enables an instant loading experience when users go back to a page they have already visited. Pages can be blocked from entering the bfcache or get evicted while in the bfcache for different reasons, some required by a specification and some specific to browser implementations.
Modern browsers provide an optimization feature for history navigation called the [back/forward cache (bfcache)](https://web.dev/bfcache/). This enables an instant loading experience when users go back to a page they have already visited. Pages can be blocked from entering the bfcache or get evicted while in the bfcache for different reasons, some required by a specification and some specific to browser implementations.
chrisdavidmills marked this conversation as resolved.
Show resolved Hide resolved

To enable monitoring bfcache blocking in the field the [`PerformanceNavigationTiming`](/en-US/docs/Web/API/PerformanceNavigationTiming) class includes a `notRestoredReasons` property. This returns an object containing related information on the top-level frame and all {{htmlelement("iframe")}}s present in the document:
Elchi3 marked this conversation as resolved.
Show resolved Hide resolved

- Reasons why they were blocked from using the bfcache.
- Reasons why bfcache usage was blocked.
- Details such as frame `id` and `name`, to help identify `<iframe>`s in the HTML.

> **Note:** There is also a [test in Chrome dev tools](https://web.dev/bfcache/#test) that reports on whether your pages are cacheable.
chrisdavidmills marked this conversation as resolved.
Show resolved Hide resolved
Expand Down Expand Up @@ -57,21 +57,21 @@ For history navigations, the {{domxref("PerformanceNavigationTiming.notRestoredR
The properties are as follows:

- {{domxref("NotRestoredReasons.children", "children")}} {{ReadOnlyInline}} {{Experimental_Inline}}
- : An array of {{domxref("NotRestoredReasons")}} objects representing the blocked state of any child {{htmlelement("iframe")}}s embedded in the current document. Each object has the same structure as the parent object — this way, any number of levels of embedded `<iframe>s` can be represented inside the object recursively. If the frame has no children, the array will be empty; if the document is in a cross-origin `<iframe>`, `children` will return `null`.
- : An array of {{domxref("NotRestoredReasons")}} objects, one for each child {{htmlelement("iframe")}} embedded in the current document, which may contain reasons why the top-level frame was blocked relating to the child frames. Each object has the same structure as the parent object — this way, any number of levels of embedded `<iframe>`s can be represented inside the object recursively. If the frame has no children, the array will be empty; if the document is in a cross-origin `<iframe>`, `children` will return `null`.
- {{domxref("NotRestoredReasons.id", "id")}} {{ReadOnlyInline}} {{Experimental_Inline}}
- : A string representing the `id` attribute value of the `<iframe>` the document is contained in (for example `<iframe id="foo" src="...">`). If the document is not in an `<iframe>` or the `<iframe>` has no `id` set, `id` will return `null`.
- {{domxref("NotRestoredReasons.name", "name")}} {{ReadOnlyInline}} {{Experimental_Inline}}
- : A string representing the `name` attribute value of the `<iframe>` the document is contained in (for example `<iframe name="bar" src="...">`). If the document is not in an `<iframe>` or the `<iframe>` has no `name` set, `name` will return `null`.
- {{domxref("NotRestoredReasons.reasons", "reasons")}} {{ReadOnlyInline}} {{Experimental_Inline}}
- : An array of {{domxref("NotRestoredReasonDetails")}} objects, each representing a reason why the navigated page was blocked from using the bfcache. If the document is in a cross-origin `<iframe>`, `reasons` will return `null`. See [Blocking reasons](#blocking_reasons) for more details on the reasons.
- : An array of {{domxref("NotRestoredReasonDetails")}} objects, each representing a reason why the navigated page was blocked from using the bfcache. If the document is in a cross-origin `<iframe>`, `reasons` will return `null`, but the parent document may show a `reason` of `"masked"` if any `<iframe>`s blocked bfcache usage for the top-level frame. See [Blocking reasons](#blocking_reasons) for more details on the reasons.
- {{domxref("NotRestoredReasons.src", "src")}} {{ReadOnlyInline}} {{Experimental_Inline}}
- : A string representing the path to the source of the `<iframe>` the document is contained in (for example `<iframe src="exampleframe.html">`). If the document is not in an `<iframe>`, `src` will return `null`.
- {{domxref("NotRestoredReasons.url", "url")}} {{ReadOnlyInline}} {{Experimental_Inline}}
- : A string representing the URL of the navigated page or `<iframe>`. If the document is in a cross-origin `<iframe>`, `url` will return `null`.

### Reporting bfcache blocking in same-origin `<iframe>`s

When a page has same-origin `<iframe>`s embedded, the returned `notRestoredReasons` value will contain an array of objects inside the `children` property representing the blocked state of each embedded frame.
When a page has same-origin `<iframe>`s embedded, the returned `notRestoredReasons` value will contain an array of objects inside the `children` property representing the blocking reasons related to each embedded frame.

For example:

Expand Down Expand Up @@ -107,7 +107,7 @@ For example:

### Reporting bfcache blocking in cross-origin `<iframe>`s

When a page has cross-origin frames embedded, we limit the amount of information shared about them to avoid leaking cross-origin information. We only include information that the outer page already knows, and whether the cross-origin subtree blocked the bfcache or not. We don't include any blocking reasons or information about lower levels of the subtree (even if some sub-levels are same-origin).
When a page has cross-origin frames embedded, we limit the amount of information shared about them to avoid leaking cross-origin information. We only include information that the outer page already knows, and whether the cross-origin subtree caused bfcache blocking or not. We don't include any blocking reasons or information about lower levels of the subtree (even if some sub-levels are same-origin).
chrisdavidmills marked this conversation as resolved.
Show resolved Hide resolved

For example:

Expand All @@ -119,8 +119,8 @@ For example:
id: "iframe-id",
name: "iframe-name",
reasons: [],
src: "./index.html",
url: "https://www.example2.com/"
src: "https://www.example2.com/",
url: null
}
],
id: null,
Expand All @@ -140,7 +140,7 @@ For all the cross-origin `<iframe>`s, no blocking reasons are reported; for the

There are many different reasons why blocking could occur, and browsers can choose to implement their own specific reasons for blocking, based on how they operate. Developers should avoid depending on specific wording for reasons and be prepared to handle new reasons being added and deleted.

The values listed in the specification are:
The initial values listed in the specification are:

- `"fetch"`
- : While unloading, a fetch initiated by the current document (e.g. via {{domxref("fetch()")}}) was canceled while ongoing. As a result, the page was not in a stable state that could be stored in the bfcache.
Expand All @@ -157,7 +157,7 @@ The values listed in the specification are:
- `"websocket"`
- : While unloading, an open [WebSocket](/en-US/docs/Web/API/WebSockets_API) connect was shut down, so the page was not in a stable state that could be stored in the bfcache.

Chrome implements the following additional blocking reasons (among others):
Additional blocking reasons may be used by some browsers, for example:

- `"unload-listener"`
- : The page registers an [`unload`](/en-US/docs/Web/API/Window/unload_event) handler, which prevents bfcache usage. This serves as a useful warning, as `unload` is deprecated. See [Deprecating the unload event](https://developer.chrome.com/docs/web-platform/deprecating-unload) for more information.
chrisdavidmills marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/performancenavigationtiming/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ The interface also supports the following properties:
- {{domxref('PerformanceNavigationTiming.loadEventStart')}} {{ReadOnlyInline}}
- : A {{domxref("DOMHighResTimeStamp")}} representing the time immediately before the current document's [`load`](/en-US/docs/Web/API/Window/load_event) event handler starts.
- {{domxref('PerformanceNavigationTiming.notRestoredReasons')}} {{ReadOnlyInline}}
chrisdavidmills marked this conversation as resolved.
Show resolved Hide resolved
- : A {{domxref("NotRestoredReasons")}} object providing report data on whether frames present in the current document were blocked from using the [back/forward cache (bfcache)](https://web.dev/articles/bfcache) on navigation, and why.
- : A {{domxref("NotRestoredReasons")}} object providing report data on reasons why the current document was blocked from using the [back/forward cache (bfcache)](https://web.dev/articles/bfcache) on navigation.
chrisdavidmills marked this conversation as resolved.
Show resolved Hide resolved
- {{domxref('PerformanceNavigationTiming.redirectCount')}} {{ReadOnlyInline}}
- : A number representing the number of redirects since the last non-redirect navigation in the current browsing context.
- {{domxref('PerformanceNavigationTiming.type')}} {{ReadOnlyInline}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ browser-compat: api.PerformanceNavigationTiming.notRestoredReasons

{{APIRef("Performance API")}}{{SeeCompatTable}}

The **`notRestoredReasons`** read-only property of the {{domxref("PerformanceNavigationTiming")}} interface returns a {{domxref("NotRestoredReasons")}} object providing report data on whether frames present in the current document were blocked from using the [back/forward cache (bfcache)](https://web.dev/articles/bfcache) on navigation, and why.
The **`notRestoredReasons`** read-only property of the {{domxref("PerformanceNavigationTiming")}} interface returns a {{domxref("NotRestoredReasons")}} object providing report data on reasons why the current document was blocked from using the [back/forward cache (bfcache)](https://web.dev/articles/bfcache) on navigation.
chrisdavidmills marked this conversation as resolved.
Show resolved Hide resolved

## Value

Expand All @@ -37,7 +37,7 @@ function returnNRR() {
}
```

The `PerformanceNavigationTiming.notRestoredReasons` property returns an object with the following structure, which represents the blocked state of a top-level frame with no embedded child `<iframe>`s:
The `PerformanceNavigationTiming.notRestoredReasons` property returns an object with the following structure, which provides reasons why the current document was blocked from using the bfcache. In this example the top-level frame has no embedded child `<iframe>`s:

```js
{
Expand Down