Server Push Thru Http2


Server: nginx-1.15.8 downloaded as Pre-Built Packages from http://nginx.org/en/download.html

Config: in /etc/nginx, different from nginx-1.9.15, whose config in /usr/local/nginx
Add to server section: listen 444 ssl http2;
Add to location section: http2_push /style.css;

Test:
with Chrome: go to https://riowing.net:444/index.htm
Developer Tools – network: header colum shows h2
with Curl 7.63: curl.exe -vso /dev/null –http2 https://riowing.net:444/index.htm
watch for output: “server accepted to use h2”
Notes: style.css is downloaded both with and without http2. The difference is that without a separate corresponding request from browser, or so called Server Push.

Advertisements
Previous Post
Comments are closed.
%d bloggers like this: