PreloadManager
Manager for HTTP/2 asset preloading
| since |
2.0.0 |
|---|---|
| package |
Joomla Framework |
Methods
__construct
PreloadManager constructor
__construct(\Psr\Link\EvolvableLinkProviderInterface linkProvider = null) :
| since |
2.0.0 |
|---|
Arguments
- linkProvider
EvolvableLinkProviderInterface|nullThe link provider
Response
mixed
dnsPrefetch
Resolves a resource origin as early as possible.
dnsPrefetch( uri, mixed||string|int attributes = []) :
| since |
2.0.0 |
|---|
Arguments
- uri
stringThe relation URI- attributes
array<string|int, mixed>The attributes of this link (e.g. "array('as' => true)", "array('pr' => 0.5)")
Response
void
getLinkProvider
Get the link provider
getLinkProvider() : \Psr\Link\EvolvableLinkProviderInterface
| since |
2.0.0 |
|---|
Response
EvolvableLinkProviderInterface
link
Adds a "Link" HTTP header.
link( uri, rel, mixed||string|int attributes = []) :
| since |
2.0.0 |
|---|
Arguments
- uri
stringThe relation URI- rel
stringThe relation type (e.g. "preload", "prefetch", "prerender" or "dns-prefetch")- attributes
array<string|int, mixed>The attributes of this link (e.g. "array('as' => true)", "array('pr' => 0.5)")
Response
void
preconnect
Initiates a early connection to a resource (DNS resolution, TCP handshake, TLS negotiation).
preconnect( uri, mixed||string|int attributes = []) :
| since |
2.0.0 |
|---|
Arguments
- uri
stringThe relation URI- attributes
array<string|int, mixed>The attributes of this link (e.g. "array('as' => true)", "array('pr' => 0.5)")
Response
void
prefetch
Indicates to the client that it should prefetch this resource.
prefetch( uri, mixed||string|int attributes = []) :
| since |
2.0.0 |
|---|
Arguments
- uri
stringThe relation URI- attributes
array<string|int, mixed>The attributes of this link (e.g. "array('as' => true)", "array('pr' => 0.5)")
Response
void
preload
Preloads a resource.
preload( uri, mixed||string|int attributes = []) :
| since |
2.0.0 |
|---|
Arguments
- uri
stringThe relation URI- attributes
array<string|int, mixed>The attributes of this link (e.g. "array('as' => true)", "array('crossorigin' => 'use-credentials')")
Response
void
prerender
Indicates to the client that it should prerender this resource.
prerender( uri, mixed||string|int attributes = []) :
| since |
2.0.0 |
|---|
Arguments
- uri
stringThe relation URI- attributes
array<string|int, mixed>The attributes of this link (e.g. "array('as' => true)", "array('pr' => 0.5)")
Response
void
setLinkProvider
Set the link provider
setLinkProvider(\Psr\Link\EvolvableLinkProviderInterface linkProvider) :
| since |
2.0.0 |
|---|
Arguments
- linkProvider
EvolvableLinkProviderInterfaceThe link provider
Response
void
Properties
linkProvider
The link provider
| since |
2.0.0 |
|---|
Type(s)
EvolvableLinkProviderInterface