Download the PHP package facile-it/zf-link-headers-module without Composer
On this page you can find all versions of the php package facile-it/zf-link-headers-module. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download facile-it/zf-link-headers-module
More information about facile-it/zf-link-headers-module
Files in facile-it/zf-link-headers-module
Package zf-link-headers-module
Short Description Zend Framework module to push Link headers for resourcers added with HeadLink view helper
License MIT
Homepage https://github.com/facile-it/zf-link-headers-module
Informations about the package zf-link-headers-module
ZFLinkHeadersModule
This module will automatically sends Link
HTTP headers supporting
resource hints
and preload, via HTTP headers.
Currently supported hints
From OptionsInterface
:
Configuration
This is the default configuration and options can be overridden in your configuration.
Example
Configuration:
Default configuration:
Template
In your template:
Response headers
The module will automatically add a Link header to the response:
You should notice that resource /script/foo.js
is not in headers, because it wasn't
included in preload head links.
Automatically sends stylesheets preload
Enabling stylesheet_enabled
mode in your configuration, you can avoid inserting preload links
for all your styles.
Configuration:
You can optionally change the stylesheet_mode
(supported modes are vailable as constants in OptionsInterface
)
to use on stylesheets.
Template
In your template:
Response headers
The module will automatically add a Link header to the response:
Automatically sends scripts preload
Enabling script_enabled
mode in your configuration, you can avoid inserting preload links
for all your scripts.
Configuration:
You can optionally change the script_mode
(supported modes are vailable as constants in OptionsInterface
)
to use on stylesheets.
Template
In your template:
Response headers
The module will automatically add a Link header to the response:
Disable HTTP/2 push
Using HTTP/2, sending preload link headers the web server will push contents to the browser when the page is requested.
This isn't always necessary, because browsers can cache the contents and pushing them can increase bandwidth usage with no significant performance.
You can disable push setting http2_push_enabled
configuration option to false
.
This will add a nopush
attribute
that indicates to an HTTP/2 push capable server that the resource hould not be pushed
(e.g. the origin may have additional information indicating that it may already be in cache).
All versions of zf-link-headers-module with dependencies
psr/container Version ^1.0
zendframework/zend-eventmanager Version ^3.0
zendframework/zend-http Version ^2.5.4
zendframework/zend-modulemanager Version ^2.7.1
zendframework/zend-mvc Version ^3.0
zendframework/zend-stdlib Version ^3.1
zendframework/zend-view Version ^2.6.7
zendframework/zend-servicemanager Version ^3.0.3
container-interop/container-interop Version ^1.2