Back to PreloadManager class

Method preload

public void
preload
(string $uri, array $attributes = [])
Preloads a resource.
Parameters
  • string $uri A public path
  • array $attributes The attributes of this link (e.g. "array('as' => true)", "array('crossorigin' => 'use-credentials')")
Returns
  • void
Since
  • 4.0.0

Method preload - Source code

/**
 * Preloads a resource.
 *
 * @param   string  $uri         A public path
 * @param   array   $attributes  The attributes of this link (e.g. "array('as' => true)", "array('crossorigin' => 'use-credentials')")
 *
 * @return  void
 *
 * @since   4.0.0
 */
public function preload(string $uri, array $attributes = [])
{
    $this->link($uri, 'preload', $attributes);
}