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

Incorporate breakpoints into preconnect links added by Embed Optimizer #1341

Open
westonruter opened this issue Jul 10, 2024 · 0 comments
Open
Assignees
Labels
[Plugin] Embed Optimizer Issues for the Embed Optimizer plugin (formerly Auto Sizes) [Plugin] Optimization Detective Issues for the Optimization Detective plugin [Type] Enhancement A suggestion for improvement of an existing feature

Comments

@westonruter
Copy link
Member

westonruter commented Jul 10, 2024

It would be slightly better if the viewport widths were also taken into account, so that an embed only visible on desktop would not get preconnected on mobile. This can be addressed in a follow-up PR.

Originally posted by @westonruter in #1302 (comment)

Code in question:

foreach ( $preconnect_hrefs as $preconnect_href ) {
$this->link_collection->add_link(
array(
'rel' => 'preconnect',
'href' => $preconnect_href,
)
);
}

@westonruter westonruter added [Plugin] Embed Optimizer Issues for the Embed Optimizer plugin (formerly Auto Sizes) [Type] Enhancement A suggestion for improvement of an existing feature [Plugin] Optimization Detective Issues for the Optimization Detective plugin labels Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Plugin] Embed Optimizer Issues for the Embed Optimizer plugin (formerly Auto Sizes) [Plugin] Optimization Detective Issues for the Optimization Detective plugin [Type] Enhancement A suggestion for improvement of an existing feature
1 participant