Code Monkey home page Code Monkey logo

Comments (7)

npm1 avatar npm1 commented on May 23, 2024 2

The first option seems fine to me. What's the navigationStart when prefetch is used?

from navigation-timing.

jeremyroman avatar jeremyroman commented on May 23, 2024

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.

sefeng211 avatar sefeng211 commented on May 23, 2024

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.

igrigorik avatar igrigorik commented on May 23, 2024

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.

nicjansma avatar nicjansma commented on May 23, 2024

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.

yoavweiss avatar yoavweiss commented on May 23, 2024

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 the NavigationType 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.

nicjansma avatar nicjansma commented on May 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.