Reputation: 3517
Does anyone have an example of how to use Polymer's push-manifest.json files with HTTP2 Server Push to send a pages resources along with the HTML page it self in the same connecton? Are there any good examples of how to get this working out there?
The push-manifest.json files looks like this:
{
"theme/test-theme/index.html": {
"theme/test-theme/somestyling.css": {
"type": "document",
"weight": 1
}
}
}
Upvotes: 1
Views: 576
Reputation: 12601
If you are using Node.js on the server side, you can use prpl-server-node, which looks for push-manifest.json
and sets appropriate preload link headers according to it (see the prpl-server-node
's README for detail).
Make sure your reverse proxy supports HTTP/2, as also described in the README.
Upvotes: 1