type
Summary
Returns the type of the last non-redirect navigation in the current browsing context. See Notes.
Property of apis/navigation timing/PerformanceNavigationapis/navigation timing/PerformanceNavigation
Syntax
Note: This property is read-only.
var result = PerformanceNavigation.type;
Return Value
Returns an object of type unsigned shortunsigned short
Examples
var perfnavtyp = performance.navigation.type;
alert(perfnavtyp); // see Notes
Notes
This attribute must have one of the following navigation type values.
- TYPE_NAVIGATE (0): Navigation started by clicking on a link, or entering the URL in the user agent’s address bar, or form submission, or initializing through a script operation other than the ones used by TYPE_RELOAD and TYPE_BACK_FORWARD as listed below.
- TYPE_RELOAD (1): Navigation through the reload operation or the location.reload() method.
- TYPE_BACK_FORWARD (2): Navigation through a history traversal operation.
- TYPE_RESERVED (255): Any navigation types not defined by values above.
Related specifications
- W3C Navigation Timing Specification 2
- W3C Working Draft
Attributions
Microsoft Developer Network: Windows Internet Explorer API reference Article