5 ms·
Nginx-1.13.9
- seeekr 9y agoThe significant (and only) feature addition being HTTP/2 server push support: > Feature: HTTP/2 server push support; the "http2_push" and "http2_push_preload" directives.
- cajdavidson 9y agoThanks, found this link about this which was pretty useful as someone who doesn't know much about this already; https://www.smashingmagazine.com/2017/04/guide-http2-server-push/ https://www.smashingmagazine.com/2017/04/guide-http2-server-...
- ehPReth 9y agoHere's the docs for the specific configuration parameters introduced (http2_push and http2_push_preload): https://nginx.org/en/docs/http/ngx_http_v2_module.html#http2_push https://nginx.org/en/docs/http/ngx_http_v2_module.html#http2...
- continuations 9y agoWhat about caching? If the assets I want to push to browser are already cached in the browser would Nginx be smart enough to not to push?
- fnordo 9y agoIn their intro to push they say to not push objects that are already cached so I'd wager no
- alwillis 9y agoCache digests enables the browser to tell the server what’s cached so the server doesn’t push something unnecessarily: http://httpwg.org/http-extensions/cache-digest.html http://httpwg.org/http-extensions/cache-digest.html
- necro 9y agoI'm not sure if I never understood this right, but it seemed server push was not an ideal overall solution. It seemed it was targeted to push needed css/js/image in the stream of the page result. But most assets that one would want loaded are coming via an external CDN so doing a push of that does not make sense. Yeah, I guess if you are proxying your whole site via the CDN. Am I missing something here?
- atonse 9y agoMy view on this is that it doesn't just work for "http page preloads assets to get", and more like "http request preloads other http requests" ... the difference is, in the case of a CDN, they could basically download a JS file for, say, a JS framework, but also send you jQuery, etc because they know it's dependent. All this is to get away from a lot of our current hacky workflows (like file concatenation).
- nly 9y agoI saw a talk on this from someone at Fastly where they talked about protocol changes that would allow CDNs like theirs to do push from the edge
- andrewmcwatters 9y agoI don't see a lot of external CDN script (like cdnjs) use in the real-world anymore. That's sort of dated compared to bundling and using something like S3. Ideally, these days you'd still minify, but your *.html files could plainly include scripts, and the server would read the resources to be sent, and send them all over the same stream, rather than forcing a client to open multiple connections.