RE: [NavigationTiming] Working draft updated

Hi Zhiheng,

For this change:
                https://dvcs.w3.org/hg/webperf/rev/d4e16b2fd2b7

It looks like:
Client-side redirects, such as those using the Refresh pragma directive<http://dev.w3.org/html5/spec/semantics.html#attr-meta-http-equiv-refresh>, are not considered HTTP redirects or equivalent<http://dev.w3.org/html5/spec/fetching-resources.html#concept-http-equivalent-codes> by this spec. In those cases, the type<https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/NavigationTiming/Overview.html#nt-navigation-info-type> attribute should return appropriate value, such as TYPE_NAVIGATION, as if in non-redirect navigation.

Was changed to:
Client-side redirects, such as those using the Refresh pragma directive<http://dev.w3.org/html5/spec/semantics.html#attr-meta-http-equiv-refresh>, are not considered HTTP redirects or equivalent<http://dev.w3.org/html5/spec/fetching-resources.html#concept-http-equivalent-codes> by this spec. In those cases, the type<https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/NavigationTiming/Overview.html#nt-navigation-info-type> attribute should return appropriate value, such as TYPE_RELOAD<https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/NavigationTiming/Overview.html#nt-navigation-info-type-navigate>, as if in non-redirect navigation.


Since the Refresh pragma<http://dev.w3.org/html5/markup/meta.http-equiv.refresh.html> can either reload the current page (<meta http-equiv="refresh" content="2"> , in which case type=1) or initiate a new navigation to a new URL (<meta http-equiv="refresh" content="2;http://newurl.com"> , in which case type=0), maybe we could clarify the document slightly:
Client-side redirects, such as those using the Refresh pragma directive<http://dev.w3.org/html5/spec/semantics.html#attr-meta-http-equiv-refresh>, are not considered HTTP redirects or equivalent<http://dev.w3.org/html5/spec/fetching-resources.html#concept-http-equivalent-codes> by this spec. In those cases, the type<https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/NavigationTiming/Overview.html#nt-navigation-info-type> attribute should return appropriate value, such as TYPE_RELOAD<https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/NavigationTiming/Overview.html#nt-navigation-info-type-navigate> if reloading the current page, or TYPE_NAVIGATION if navigating to a new URL.

Don't know if this is necessary or not, but might help make it clearer.

- Nic

From: public-web-perf-request@w3.org [mailto:public-web-perf-request@w3.org] On Behalf Of Zhiheng Wang
Sent: Wednesday, March 30, 2011 9:59 AM
To: public-web-perf; Olli Pettay; Tony Gentilcore
Subject: [NavigationTiming] Working draft updated

   The working draft of the NavigationTiming<https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/NavigationTiming/Overview.html> has been updated to address the AIs from
the last conf call. Here are the specific changes:

 * Sec. 1:

  For example, the following Javascript shows a naive attempt to measure the time it takes to fully load a page:

 * Sec. 4.3

This attribute must return the type of the last non-redirect navigation in the current browsing context. It must have one of the following navigation type values.

TYPE_NAVIGATE: 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 location.reload() method.

TYPE_RELOAD: Navigation through the reload operation or the location.reload() method.

TYPE_BACK_FORWARD: Navigation through a history traversal operation.

TYPE_RESERVED: Any navigation types not defined by values above.

  Client-side redirects, such as those using the Refresh pragma directive, are not considered HTTP redirects or equivalent by this spec. In those cases, the type attribute should return appropriate value, such as TYPE_RELOAD, as if in non-redirect navigation.
   * Sec 4.5.3

 Record the current navigation type in window.performance.navigation.type if it has not been set:

  *   If the navigation was 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 location.reload() method, let the navigation type be TYPE_NAVIGATE.
  *   If the navigation was started either as a result of a meta refresh, or the location.reload() method, or other equivalent actions, let the navigation type be TYPE_RELOAD.
  *   If the navigation was started as a result of history traversal, let the navigation type be TYPE_BACK_FORWARD.
  *   Otherwise, let the navigation type be TYPE_RESERVED.
  Please let me your comments.

cheers,
Zhiheng

Received on Friday, 1 April 2011 20:32:30 UTC