Comments (7)
The first option seems fine to me. What's the navigationStart when prefetch is used?
from navigation-timing.
What's the navigationStart when prefetch is used?
It's still after the user clicks the link (or otherwise starts a navigation), in my view.
from navigation-timing.
I want to +1 to what Dan said in the WebPerfWG that resource timing seems to be a more appropriate place for this.
I assume we can't use existing timing attributes to implicitly expose whether a page is fetched? If not, then I wonder if another option could be to introduce a new timing attribute to do expose that implicitly?
from navigation-timing.
I assume we can't use existing timing attributes to implicitly expose whether a page is fetched? If not, then I wonder if another option could be to introduce a new timing attribute to do expose that implicitly?
I think it's possible. For sake of argument...
- Set NavigationType to
prefetch
- Rest of variables are no different from cache or SW fetch case
Looking from the outside, a successful (adopted) prefetch looks the same to having a resource in memory / disk cache.
from navigation-timing.
Yoav and I will review the previous discussion and will present options in a future WebPerf WG call to move this forward.
from navigation-timing.
So it seems like we have multiple options here:
- Recognize that any resource can be prefetched, and hence add a "prefetch" indicator on
PerformanceResourceTiming
, as @DanShappir and @sefeng211 suggested. - Add a "prefetch" indicator on
PerformanceNavigationTiming
, either as a stand alone boolean, or as part of theNavigationType
enum- The latter would would mean that a prefetched navigation can't be any of the other types. We'd need to define e.g. what happens when a prefetched navigation is reloaded, etc.
I tend to agree that an indicator on the ResourceTiming entry (which NavigationTiming will inherit) may be a better fit. This seems related to w3c/resource-timing#303 as well as directly exposing if a resource was fetched from the cache (compared to today's jumping through hoops with transferSize
that is required to get that info).
/cc @noamr
from navigation-timing.
Discussed on Apr 28 WebPerf WG call: https://w3c.github.io/web-performance/meetings/2022/2022-04-28/index.html
Summary:
- It seems fine to expose prefetch and Critical-CH signals orthogonally.
from navigation-timing.
Related Issues (20)
- Using navigationStart as a baseline may expose cross-origin timing information HOT 69
- Processing Model: Should 'prompt for unload' box actually be unload?
- Using "connectStart", "secureConnectionStart" and "connectEnd" with HTTP/3 flows HOT 5
- Reporting timestamps rely on a global object which might not exist yet HOT 1
- ToT spec has a bunch of respec warnings and errors HOT 1
- Should pages with different COOP be able to get unload event start/end. HOT 13
- Extend Navigation Timing API to include back/forward cache NotRestoredReasons HOT 4
- Links to "relevant application caches" are broken HOT 1
- Report that Critical-CH was used to restart a navigation HOT 5
- Extend the navigationType enum to include "reload after being discarded" navigations HOT 3
- Detecting whether a navigation was BFCache-eligible HOT 2
- Extend 'NavigationType' to include User Agent Launch HOT 13
- Clarify how PerformanceTiming.responseStart relates to Early Hint responses HOT 5
- performance.timeOrigin vs performance.timing.navigationStart HOT 3
- Extending the NavigationTimingType HOT 5
- NavigationTimingType enum need updates as HTML spec changed HOT 7
- Broken references in Navigation Timing Level 2 HOT 1
- Broken references in Navigation Timing Level 2
- Measuring `beforeunload` HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from navigation-timing.