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

feat(theme): preconnect algolia when idle #1851

Merged
merged 1 commit into from
Jan 29, 2023

Conversation

sapphi-red
Copy link
Contributor

Add <link rel="preconnect" /> for algolia when algolia search is enabled and idle.
https://docsearch.algolia.com/docs/docsearch-v3/#performance-optimization

I decided to inject this link tag on client-side by requestIdleCallback because I didn't find a good way to inject head tags from a theme on build step and didn't think this needs to be eagerly done.

@brc-dd brc-dd merged commit 1f77577 into vuejs:main Jan 29, 2023
@sapphi-red sapphi-red deleted the feat/preconnect-algolia branch January 29, 2023 10:06
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants