I installed nginx with HTTP2 support. My nginx is behind application load balancer and SSL termination is happening at LB only.
I first enabled HTTP2_PUSH like below:
http2_push_preload on;
location /mx {
http2_push https://example.com/css/style.css;
http2_push https://example.com/js/main.js
}
But it did not work. My browser debugger network tab was showing initiator is "index", and nghttp also did not show anything.
Another approach I tried is:
http2_push_preload on;
location /mx {
add_header Link "<https://example.com/css/style.css>; rel=preload; as=style,<http2_push https://example.com/js/main.js>; rel=preload; as=script";
}
Next approach changed initiator from index
to other
in network tab, but nghttp tool still confirms that no server push is happening.