cvette/flow-web-link

Last activity 05 Nov 2017 6
composer require cvette/flow-web-link

Neos Flow WebLink Package.

v1.0.0

Version
v1.0.0
Type
neos-package
Release Date
Nov 05, 2017 16:53
Source
git
Distribution
zip
Requires
MIT
  • #performance
  • #http
  • #link
  • #push
  • #preload
  • #prerender
  • #http2
  • #psr13
  • #prefetch
  • #dns-prefetch
c9eeff0feee8368ee483def1578276b09ec7f9bc

Latest Stable Version Total Downloads License

WebLink Package for Neo Flow

This Neos Flow package provides methods to manage links between resources and advise clients to preload and prefetch resources through HTTP and HTTP/2 pushes.

Usage

You can add a link header in three different ways:

Using the Fusion Prototype

This will output a Html link tag with the given "rel" attribute and set the Http link header for the response.

 link = Vette.WebLink:Link {
      href = 'http://foo.bar/x.y'
      rel = 'preload'
 }

Using the EEL Helper

If you use this EEL helper, make sure the containing Fusion prototype is uncached.

 $href = ${Vette.WebLink.link('http://foo.bar/x.y', 'preload')}

Adding a Link Header via the WebLink Service

 /**
  * @Flow\Inject
  * @var WebLinkService
  **/
 protected $webLinkService;
 
 ...
 
 $this->webLinkService->link('http:foo.bar/x.y', 'preload');
The content of the readme is provided by Github
The same vendor provides 6 package(s).