Skip to content

Commit

Permalink
docs: update readme to reflect image pushing
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobBennett committed Jul 31, 2016
1 parent 657c74c commit 31719be
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Server Push is a HTTP/2 concept which allows the server to speculatively start sending resources to the client. This can potentially speed up initial page load times: the browser doesn't have to parse the HTML page and find out which other resources to load, instead the server can start sending them immediately. [(source)](http://blog.xebia.com/http2-server-push/)

This package aims to provide the _easiest_ experience for adding Server Push to your responses.
Simply route your requests through the `AddHttp2ServerPush` middleware and it will automatically create and attach the `Link` headers necessary to implement Server Push for your CSS and JS assets.
Simply route your requests through the `AddHttp2ServerPush` middleware and it will automatically create and attach the `Link` headers necessary to implement Server Push for your CSS, JS and Image assets.

## Installation

Expand All @@ -32,9 +32,11 @@ protected $middleware = [

## Usage

When you route a request through the `AddHttp2ServerPush` middleware, the response is scanned for any `link` or `script` tags that could benefit from being loaded using Server Push.
When you route a request through the `AddHttp2ServerPush` middleware, the response is scanned for any `link`, `script` or `img` tags that could benefit from being loaded using Server Push.
These assets will be added to the `Link` header before sending the response to the client. Easy!

**Note:** To push an image asset, it must have one of the following extensions: `bmp`, `gif`, `jpg`, `jpeg`, `png` or `tiff`.

## Testing

``` bash
Expand Down

0 comments on commit 31719be

Please sign in to comment.