Preload links can be sent via Link
HTTP response headers over HTML link
tags
#1321
Labels
Good First Issue
Issue particularly suitable to be worked on by new contributors
[Plugin] Optimization Detective
Issues for the Optimization Detective plugin
[Type] Enhancement
A suggestion for improvement of an existing feature
Milestone
As noted in the web.dev article, Preload critical assets to improve loading speed, sending the preload links via
Link
HTTP response headers has a slight performance advantage over HTMLlink
tags:Since Optimization Detective is output-buffering the page, this can be very straightforward to implement. Instead of (or rather in addition to) doing this:
performance/plugins/optimization-detective/optimization.php
Lines 192 to 195 in 2f2691a
A new method can be added to
OD_Preload_Link_Collection
likesend_headers()
which can construct theLink
response header and send it viaheader()
.The text was updated successfully, but these errors were encountered: