I use urllib.request.urlopen
to fetch data from server over HTTPS
. The function is called a lot to the same server, often to the exact same url. However, unlike standard web browsers which perform a handshake on initial request, calling separate urlopen(url)
's will result in a new handshake for each call. This is very slow on high-latency networks. Is there a way to perform handshake once and reuse the existing connection for further communications?
I cannot modify server code to utilise sockets or other protocols.