Dmitriy Gnatenko 2e430a556d Vendors updated 3 tahun lalu
..
EventListener da31d8a6df Revert "Vendors updated" 4 tahun lalu
CHANGELOG.md da31d8a6df Revert "Vendors updated" 4 tahun lalu
GenericLinkProvider.php da31d8a6df Revert "Vendors updated" 4 tahun lalu
HttpHeaderSerializer.php 2e430a556d Vendors updated 3 tahun lalu
LICENSE e5f3fbd37b Vendors updated 3 tahun lalu
Link.php 2e430a556d Vendors updated 3 tahun lalu
README.md e5f3fbd37b Vendors updated 3 tahun lalu
composer.json e5f3fbd37b Vendors updated 3 tahun lalu

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