EthikTag/vendor/symfony/web-link
Rudy b21f2bc04b conteneurisation de l'appli 2023-01-07 22:07:15 +01:00
..
EventListener conteneurisation de l'appli 2023-01-07 22:07:15 +01:00
CHANGELOG.md conteneurisation de l'appli 2023-01-07 22:07:15 +01:00
GenericLinkProvider.php conteneurisation de l'appli 2023-01-07 22:07:15 +01:00
HttpHeaderSerializer.php conteneurisation de l'appli 2023-01-07 22:07:15 +01:00
LICENSE conteneurisation de l'appli 2023-01-07 22:07:15 +01:00
Link.php conteneurisation de l'appli 2023-01-07 22:07:15 +01:00
README.md conteneurisation de l'appli 2023-01-07 22:07:15 +01:00
composer.json conteneurisation de l'appli 2023-01-07 22:07:15 +01:00

README.md

WebLink Component

The WebLink component manages links between resources. It is particularly useful to advise clients to preload and prefetch documents through HTTP and HTTP/2 pushes.

This component implements the HTML5's Links, Preload and Resource Hints W3C's specifications. It can also be used with extensions defined in the HTML5 link type extensions wiki.

Getting Started

$ composer require symfony/web-link
use Symfony\Component\WebLink\GenericLinkProvider;
use Symfony\Component\WebLink\HttpHeaderSerializer;
use Symfony\Component\WebLink\Link;

$linkProvider = (new GenericLinkProvider())
    ->withLink(new Link('preload', '/bootstrap.min.css'));

header('Link: '.(new HttpHeaderSerializer())->serialize($linkProvider->getLinks()));

echo 'Hello';

Resources