Skip to content

perf(v2): add link rel preconnect for GA & google tag plugin#2062

Merged
endiliey merged 1 commit intoendi/assettagsfrom
endi/preconnect
Nov 30, 2019
Merged

perf(v2): add link rel preconnect for GA & google tag plugin#2062
endiliey merged 1 commit intoendi/assettagsfrom
endi/preconnect

Conversation

@endiliey
Copy link
Contributor

@endiliey endiliey commented Nov 27, 2019

Motivation

This PR requires #2057 to be looked first It's a PR for a PR. Just so that lerna changelog can pick it up

https://css-tricks.com/using-relpreconnect-to-establish-network-connections-early-and-increase-performance/

As suggested by lighthouse, can save few seconds
preconnect tips

Have you read the Contributing Guidelines on pull requests?

yes

Test Plan

image

@endiliey endiliey added the pr: performance This PR does not add a new behavior, but existing behaviors will be more memory- / time-efficient. label Nov 27, 2019
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Nov 27, 2019
Copy link
Contributor

@yangshun yangshun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool 😎

@endiliey
Copy link
Contributor Author

Seems that we need to modify the gtag plugin too ? Such that it doesnt wait till js load for it to append the script

I’m talking about this

const $scriptEl = window.document.createElement('script');

@endiliey endiliey merged commit 690de07 into endi/assettags Nov 30, 2019
@endiliey endiliey deleted the endi/preconnect branch November 30, 2019 05:55
@endiliey
Copy link
Contributor Author

OOps i merged it to wrong branch

@endiliey endiliey restored the endi/preconnect branch November 30, 2019 06:28
@endiliey endiliey removed the pr: performance This PR does not add a new behavior, but existing behaviors will be more memory- / time-efficient. label Nov 30, 2019
@yangshun
Copy link
Contributor

yangshun commented Nov 30, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Signed Facebook CLA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants