Skip to content

Commit 04ab306

Browse files
dunglasnicolas-grekas
authored andcommitted
[WebLink] Hint that prerender is deprecated
1 parent 0457b79 commit 04ab306

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Extension/WebLinkExtension.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function getFunctions(): array
4646
/**
4747
* Adds a "Link" HTTP header.
4848
*
49-
* @param string $rel The relation type (e.g. "preload", "prefetch", "prerender" or "dns-prefetch")
49+
* @param string $rel The relation type (e.g. "preload", "prefetch", or "dns-prefetch")
5050
* @param array $attributes The attributes of this link (e.g. "['as' => true]", "['pr' => 0.5]")
5151
*
5252
* @return string The relation URI
@@ -117,7 +117,11 @@ public function prefetch(string $uri, array $attributes = []): string
117117
}
118118

119119
/**
120-
* Indicates to the client that it should prerender this resource .
120+
* Indicates to the client that it should prerender this resource.
121+
*
122+
* This feature is deprecated and superseded by the Speculation Rules API.
123+
*
124+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/rel/prerender
121125
*
122126
* @param array $attributes The attributes of this link (e.g. "['as' => true]", "['pr' => 0.5]")
123127
*

0 commit comments

Comments
 (0)