-
Notifications
You must be signed in to change notification settings - Fork 22.4k
/
index.md
58 lines (39 loc) · 2.35 KB
/
index.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
---
title: PerformanceNavigation
slug: Web/API/PerformanceNavigation
page-type: web-api-interface
status:
- deprecated
browser-compat: api.PerformanceNavigation
---
{{APIRef("Performance API")}}{{Deprecated_Header}}
The legacy **`PerformanceNavigation`** interface represents information about how the navigation to the current document was done.
> **Warning:** This interface is deprecated in the [Navigation Timing Level 2 specification](https://w3c.github.io/navigation-timing/#obsolete).
> Please use the {{domxref("PerformanceNavigationTiming")}} interface instead.
An object of this type can be obtained by calling the {{domxref("Performance.navigation")}} read-only attribute.
## Instance properties
_The `PerformanceNavigation` interface doesn't inherit any properties._
- {{domxref("PerformanceNavigation.type")}} {{ReadOnlyInline}} {{deprecated_inline}}
- : An `unsigned short` which indicates how the navigation to this page was done. Possible values are:
- `TYPE_NAVIGATE` (0)
- : The page was accessed by following a link, a bookmark, a form submission, or a script, or by typing the URL in the address bar.
- `TYPE_RELOAD` (1)
- : The page was accessed by clicking the Reload button or via the {{domxref("Location.reload()")}} method.
- `TYPE_BACK_FORWARD` (2)
- : The page was accessed by navigating into the history.
- `TYPE_RESERVED` (255)
- : Any other way.
- {{domxref("PerformanceNavigation.redirectCount")}} {{ReadOnlyInline}} {{deprecated_inline}}
- : An `unsigned short` representing the number of REDIRECTs done before reaching the page.
## Instance methods
_The `Performance` interface doesn't inherit any methods._
- {{domxref("PerformanceNavigation.toJSON()")}} {{deprecated_inline}}
- : A {{Glossary("Serialization","serializer")}} returning a JSON object representing the `PerformanceNavigation` object.
## Specifications
This feature is no longer on track to become a standard, as the [Navigation Timing specification](https://w3c.github.io/navigation-timing/#obsolete) has marked it as deprecated.
Use the {{domxref("PerformanceNavigationTiming")}} interface instead.
## Browser compatibility
{{Compat}}
## See also
- The {{domxref("Performance")}} that allows access to an object of this type.
- {{domxref("PerformanceNavigationTiming")}} (part of Navigation Timing Level 2) that has superseded this API.