tirithen
tirithen

Reputation: 3517

Spring: how to use Polymer push-manifest.json with HTTP2 Server Push in a Spring project

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

Answers (1)

kimamula
kimamula

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

Related Questions