The HTTP/2 specification provides the server with the ability to push the resources, prior to being requested. This recipe shows you how to implement the server push.
Utilizing HTTP/2 server push
Getting ready
Prepare the private key and self-signed X-509 certificate. For this purpose, the openssl utility could be used. By executing the command openssl genrsa -out server.key 2048, the private key derived with the use of the RSA algorithm is generated to file, server.key. Based on this private key, the X-509 certificate could be generated by calling openssl req -new -x509 -sha256 -key server.key -out server.crt -days 365. The server.crt file is created.