Skip to content

cchan/serverpush-linker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

serverpush-linker

Build Status

Express middleware to automatically add Link: headers for upstream HTTP/2-supporting proxies to server-push.

Background

HTTP/2 supports Server Push, a feature that allows the server to send assets it already knows will be useful to the HTML page alongside it in the first HTTP response. Several implementations (Nginx, CloudFlare) will use Link: headers to inform fetching and sending of such Server Pushes. This module provides an automatic way to server-push all assets.

How to use

npm install serverpush-linker

Then add

const spl = require('serverpush-linker')

app.use(spl())

before any handlers or middleware that might write any body content into the response.

About

Express middleware to automatically add Link: headers for upstream HTTP/2-supporting proxies to server-push.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published