Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 981955 of PerformanceNavigation

  • Revision slug: Web/API/PerformanceNavigation
  • Revision title: PerformanceNavigation
  • Revision id: 981955
  • Created:
  • Creator: AFBarstow
  • Is current revision? Yes
  • Comment + PerformanceNatigationTiming to See Also

Revision Content

{{APIRef("Navigation Timing")}}

Summary

The PerformanceNavigation interface represents information about how the navigation to the current document was done.

An object of this type can be obtained by calling the {{domxref("Performance.navigation")}} read-only attribute.

Properties

The PerformanceNavigation interface doesn't inherit any property.

{{domxref("PerformanceNavigation.type")}} {{readonlyInline}}
Is an unsigned short containing a constant describing how the navigation to this page was done. Possible values are:
Value Constant name Meaning
0 TYPE_NAVIGATE The page was accessed by following a link, a bookmark, a form submission, a script, or typing the URL in the address bar.
1 TYPE_RELOAD The page was accessed by clicking the Reload button or via the {{domxref("Location.reload()")}} method.
2 TYPE_BACK_FORWARD The page was accessed by navigating into the history.
255 TYPE_RESERVED Any other way.
{{domxref("PerformanceNavigation.redirectCount")}} {{readonlyInline}}
Is an unsigned short representing the number of REDIRECTs done before reaching the page.

Methods

The Performance interface doesn't inherits any method.

{{domxref("PerformanceNavigation.toJSON()")}} {{non-standard_inline}}
Is a jsonizer returning a json object representing the PerformanceNavigation object.

Specifications

Specification Status Comment
{{SpecName('Navigation Timing', '#sec-navigation-info-interface', 'PerformanceNavigation')}} {{Spec2('Navigation Timing')}} Initial definition.

Browser compatibility

{{CompatibilityTable}}
Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support {{CompatNo}} {{CompatGeckoDesktop("7.0")}} 9.0 {{CompatNo}} {{CompatNo}}
toJSON() {{non-standard_inline}} {{CompatNo}} {{CompatGeckoDesktop("25.0")}} 9.0 {{CompatNo}} {{CompatNo}}
Feature Android Firefox Mobile (Gecko) Firefox OS IE Phone Opera Mobile Safari Mobile
Basic support {{CompatNo}} {{CompatGeckoMobile("7.0")}} {{CompatGeckoFxOS("7.0")}} 9.0 {{CompatNo}} {{CompatNo}}
toJSON() {{non-standard_inline}} {{CompatNo}} {{CompatGeckoMobile("25.0")}} {{CompatGeckoFxOS("25.0")}} 9.0 {{CompatNo}} {{CompatNo}}

See also

  • The {{domxref("Performance")}} that allows access to an object of this type.
  • {{domxref("PerformanceNavigationTiming")}} {{experimental_inline}}

Revision Source

<p>{{APIRef("Navigation Timing")}}</p>

<h2 id="Summary">Summary</h2>

<p>The <strong><code>PerformanceNavigation</code></strong> interface represents information about how the navigation to the current document was done.</p>

<p>An object of this type can be obtained by calling the {{domxref("Performance.navigation")}} read-only attribute.</p>

<h2 id="Properties">Properties</h2>

<p><em>The <code>PerformanceNavigation</code> interface doesn't inherit any property.</em></p>

<dl>
 <dt>{{domxref("PerformanceNavigation.type")}} {{readonlyInline}}</dt>
 <dd>Is an <code>unsigned short</code> containing a constant describing how the navigation to this page was done. Possible values are:
 <table class="standard-table">
  <thead>
   <tr>
    <th scope="col">Value</th>
    <th scope="col">Constant name</th>
    <th scope="col">Meaning</th>
   </tr>
  </thead>
  <tbody>
   <tr>
    <td><code>0</code></td>
    <td><code>TYPE_NAVIGATE</code></td>
    <td>The page was accessed by following a link, a bookmark, a form submission, a script, or typing the URL in the address bar.</td>
   </tr>
   <tr>
    <td><code>1</code></td>
    <td><code>TYPE_RELOAD</code></td>
    <td>The page was accessed by clicking the Reload button or via the {{domxref("Location.reload()")}} method.</td>
   </tr>
   <tr>
    <td><code>2</code></td>
    <td><code>TYPE_BACK_FORWARD</code></td>
    <td>The page was accessed by navigating into the history.</td>
   </tr>
   <tr>
    <td><code>255</code></td>
    <td><code>TYPE_RESERVED</code></td>
    <td>Any other way.</td>
   </tr>
  </tbody>
 </table>
 </dd>
 <dt>{{domxref("PerformanceNavigation.redirectCount")}} {{readonlyInline}}</dt>
 <dd>Is an <code>unsigned short</code> representing the number of REDIRECTs done before reaching the page.</dd>
</dl>

<h2 id="Methods">Methods</h2>

<p><em><em>The <code>Performance</code> interface doesn't inherits any </em>method</em>.</p>

<dl>
 <dt>{{domxref("PerformanceNavigation.toJSON()")}} {{non-standard_inline}}</dt>
 <dd>Is a jsonizer returning a json object representing the <code>PerformanceNavigation</code> object.</dd>
</dl>

<h2 id="Specifications">Specifications</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
  <tr>
   <td>{{SpecName('Navigation Timing', '#sec-navigation-info-interface', 'PerformanceNavigation')}}</td>
   <td>{{Spec2('Navigation Timing')}}</td>
   <td>Initial definition.</td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility">Browser compatibility</h2>

<div>{{CompatibilityTable}}</div>

<div id="compat-desktop">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Chrome</th>
   <th>Firefox (Gecko)</th>
   <th>Internet Explorer</th>
   <th>Opera</th>
   <th>Safari (WebKit)</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatGeckoDesktop("7.0")}}</td>
   <td>9.0</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatNo}}</td>
  </tr>
  <tr>
   <td><code>toJSON()</code> {{non-standard_inline}}</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatGeckoDesktop("25.0")}}</td>
   <td>9.0</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatNo}}</td>
  </tr>
 </tbody>
</table>
</div>

<div id="compat-mobile">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Android</th>
   <th>Firefox Mobile (Gecko)</th>
   <th><strong>Firefox OS</strong></th>
   <th>IE Phone</th>
   <th>Opera Mobile</th>
   <th>Safari Mobile</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatGeckoMobile("7.0")}}</td>
   <td>{{CompatGeckoFxOS("7.0")}}</td>
   <td>9.0</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatNo}}</td>
  </tr>
  <tr>
   <td><code>toJSON()</code> {{non-standard_inline}}</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatGeckoMobile("25.0")}}</td>
   <td>{{CompatGeckoFxOS("25.0")}}</td>
   <td>9.0</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatNo}}</td>
  </tr>
 </tbody>
</table>
</div>

<h2 id="See_also">See also</h2>

<ul>
 <li>The {{domxref("Performance")}} that allows access to an object of this type.</li>
 <li>{{domxref("PerformanceNavigationTiming")}} {{experimental_inline}}</li>
</ul>
Revert to this revision