Back to PreloadManager class

Method prefetch

public void
prefetch
(string $uri, array $attributes = [])
Indicates to the client that it should prefetch this resource.
Parameters
  • string $uri A public path
  • array $attributes The attributes of this link (e.g. "array('as' => true)", "array('pr' => 0.5)")
Returns
  • void
Since
  • 4.0.0

Method prefetch - Source code

/**
 * Indicates to the client that it should prefetch this resource.
 *
 * @param   string  $uri         A public path
 * @param   array   $attributes  The attributes of this link (e.g. "array('as' => true)", "array('pr' => 0.5)")
 *
 * @return  void
 *
 * @since   4.0.0
 */
public function prefetch(string $uri, array $attributes = [])
{
    $this->link($uri, 'prefetch', $attributes);
}