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

Move the Navigation Timing API polyfill to the base+polyfill build #248

Merged
merged 1 commit into from Jul 25, 2022

Conversation

philipwalton
Copy link
Member

@philipwalton philipwalton commented Jul 24, 2022

This PR removes the Navigation Timing polyfill from the "standard" build and adds it to the "base+polyfill" build. This reduces the total size of the "standard" build by about 5% (brotli'd).

When this library was first released, Safari didn't support the Navigation Timing API (Level 2), so this was a lightweight and easy way to get the TTFB metric in all modern browsers. But Safari has now supported this API since version 15, which has been out for almost a year.

I think this library should aim to support the latest stable version(s) of all modern browsers when reasonable, but given that this is a measurement library and not a feature library, I don't think full browser support should be a goal.

Also, this change primarily affects the TTFB metric, which is largely a measure of network/device capabilities rather than browser capabilities, so supporting only the latest versions of Safari seems reasonable for optimization purposes.

README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
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

Successfully merging this pull request may close these issues.

None yet

2 participants