Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop prerenderSwitch from new draft? #38

Closed
igrigorik opened this issue Oct 19, 2015 · 9 comments
Closed

Drop prerenderSwitch from new draft? #38

igrigorik opened this issue Oct 19, 2015 · 9 comments

Comments

@igrigorik
Copy link
Member

  • prerenderSwitch attribute was added back in 2013
  • it was not part of NT1, and as far as I can tell no browser has implemented it as part of NT2

There is a subtle gotcha with it too as far as interop with PerformanceObserver is concerned: our processing model says it should be set at step 26, before the entry is queued to notify any observers...

Does that mean we should delay steps 27,28 until the visibilityChange transition fires? If so, we need to change the wording in that step to account for cases where page is not being prerendered.. It also means the nav timing entry would be delayed until page is made visible.. This seems a bit odd.

I'm wondering if we should simply drop prerenderSwitch from the spec? It's trivial to get the timestamp via existing Page Visibility and User Timing APIs..

document.addEventListener('visibilitychange', function() {
  performance.mark(document.visibilityState);
});

Thoughts, objections?

@plehegar
Copy link
Member

We need feedback from Todd on this one since IE did some implementations there. @toddreifsteck?
https://msdn.microsoft.com/library/dn265039%28v=vs.85%29.aspx

@yoavweiss
Copy link
Contributor

AFAICT, it is not supported in neither Blink nor WebKit, so I would presume that it would be safe to deprecate and remove it.

Do we know what was the use case for adding it in the first place?

@plehegar
Copy link
Member

I wrote http://www.w3.org/2015/10/webperf-prerender.html to attempt to prerender the webperf overview test but it didn't trigger prerenderSwitch in Edge as far as I can tell.
Since we define prerender in Resource Hints, are you also proposing to drop
https://w3c.github.io/resource-hints/#prerender
?

@igrigorik
Copy link
Member Author

@plehegar no, I'm not proposing we drop prerender as an overall platform feature. Rather, I'm suggesting we drop prerenderSwitch from Navigation Timing spec because it's trivially implemented by the developers with existing tools (see my example above); it hasn't been implemented by any vendor; it's not clear how it's supposed to work with Performance Observer.

@plehegar
Copy link
Member

ok. sounds good to me. Let's get a +1 from Todd and we should be all set.

@igrigorik
Copy link
Member Author

@toddreifsteck can you take a quick look at this one?

@toddreifsteck
Copy link
Member

LGTM, merging

@toddreifsteck
Copy link
Member

Oh.. just an issue without a pull. Yes, this would be fine. :-)

igrigorik added a commit that referenced this issue Nov 24, 2015
@igrigorik
Copy link
Member Author

Resolved via 6cc5a9e.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants