@@ -104,7 +104,7 @@ public function __invoke( OD_Tag_Visitor_Context $context ): bool {
104104 }
105105
106106 $ this ->reduce_layout_shifts ( $ context );
107- $ this ->add_preconnect_links ( $ context );
107+ $ this ->add_dns_prefetch_links ( $ context );
108108 $ this ->lazy_load_embeds ( $ context );
109109
110110 /*
@@ -207,22 +207,22 @@ private function reduce_layout_shifts( OD_Tag_Visitor_Context $context ): void {
207207 }
208208
209209 /**
210- * Gets preconnect URLs based on embed type.
210+ * Gets dns-prefech URLs based on embed type.
211211 *
212212 * The following embeds have been chosen for optimization due to their relative popularity among all embed types.
213- * The list of hosts being preconnected to was obtained by inserting an embed into a post and then looking
213+ * The list of hosts being dns-prefetched to was obtained by inserting an embed into a post and then looking
214214 * at the network log on the frontend as the embed renders. Each should include the host of the iframe src
215215 * as well as URLs for assets used by the embed, _if_ the URL looks like it is not geotargeted (e.g. '-us')
216216 * or load-balanced (e.g. 's0.example.com'). For the load balancing case, attempt to load the asset by
217217 * incrementing the number appearing in the subdomain (e.g. s1.example.com). If the asset still loads, then
218- * it is a likely case of a load balancing domain name which cannot be safely preconnected since it could
218+ * it is a likely case of a load balancing domain name which cannot be safely dns-prefetched since it could
219219 * not end up being the load balanced domain used for the embed. Lastly, these domains are only for the URLs
220220 * for GET requests, as POST requests are not likely to be part of the critical rendering path.
221221 *
222222 * @since 0.4.1
223223 *
224224 * @param OD_HTML_Tag_Processor $processor Processor, with the cursor currently at an embed block.
225- * @return array<non-empty-string> Array of URLs to preconnect to .
225+ * @return array<non-empty-string> Array of URLs to dns-prefetch .
226226 */
227227 private function get_dns_prefetch_urls ( OD_HTML_Tag_Processor $ processor ): array {
228228 $ urls = array ();
@@ -277,13 +277,13 @@ private function get_dns_prefetch_urls( OD_HTML_Tag_Processor $processor ): arra
277277 }
278278
279279 /**
280- * Adds preconnect links for embed resources.
280+ * Adds dns-prefetch links for embed resources.
281281 *
282282 * @since 0.4.1
283283 *
284284 * @param OD_Tag_Visitor_Context $context Tag visitor context, with the cursor currently at an embed block.
285285 */
286- private function add_preconnect_links ( OD_Tag_Visitor_Context $ context ): void {
286+ private function add_dns_prefetch_links ( OD_Tag_Visitor_Context $ context ): void {
287287 $ processor = $ context ->processor ;
288288 $ embed_wrapper_xpath = self ::get_embed_wrapper_xpath ( $ processor ->get_xpath () );
289289
0 commit comments