bahmutov / http2-push-example

Example server showing HTTP/2 Push for Zeit deploy
8 stars 0 forks source link

The page is insecure and does not have Push #1

Open bahmutov opened 7 years ago

bahmutov commented 7 years ago

See deployed to Zeit https://http2-push-example-mrcimnzfrc.now.sh/_logger for example

listening on port 8010
serving home
No HTTP/2 Push :(, is page secure? false
bahmutov commented 7 years ago

Successfully deployed h2 to https://http2-push-example-tofygqqlwj.now.sh/ Need to run spdy server with options

const plainOptions = {
  spdy: {
    plain: true,
    ssl: false
  }
}

spdy.createServer(plainOptions, app).listen(8010, err => {
  if (err) {
    throw new Error(err)
  }
  console.log('listening on port 8010')
})
jakearchibald commented 7 years ago

https://http2-push-example-tofygqqlwj.now.sh/ doesn't seem to be pushing anything. Am I missing something?

bahmutov commented 7 years ago

Let me check, have not looked at this demo for a while

Sent from my iPhone

On Mar 7, 2017, at 21:09, Jake Archibald notifications@github.com wrote:

https://http2-push-example-tofygqqlwj.now.sh/ doesn't seem to be pushing anything. Am I missing something?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

bahmutov commented 7 years ago

Hi Jake! I failed to deploy this demo to Zeit, due to Nginx not supporting server push (which apparently is hard feature for a proxy to implement, since it requires keeping the channel open for long time), see the complete blog post with my actions at https://glebbahmutov.com/blog/server-push-on-dokku/

In a nut shell, had to use another proxy and my own server instance. No large gains for pushing a few images, should have pushed many small files instead to save on http handshake costs.

jakearchibald commented 7 years ago

Ahh gotcha, thanks!