QHostInfo already caches the results for a while, but upon reload, it may need to re-resolve.
Caching of IP addresses beyond the DNS TTL is a bad practice. We can't tell if an IP change is malicions (i.e., redirecting to malicious server) or a normal update of the IP address. If we provide a way for QtWebKit to cache IP addresses for longer than the 5-minute QHostInfo cache, we could be hitting servers that are being decommissioned.
The proper fix for this is to use DNSSEC, which would solve the problem neatly. A DNSSEC validator would ensure that the hostname resolved is a trusted resolution (due to an OOB cryptographic trust anchor). However, DNSSEC requires those cryptographic trust anchors to exist throughout the DNS space as well as DNS servers transmit the required authentication records.
If we do cache the IP address in QNAM, this will probably require QSslSocket to accept being told which IP to connect to yet still verify the hostname properly (or we'll have to intercept the error like KDE kio/kio/tcpslavebase.cpp does).