Seems to be due to a WebKit bug where `WKNavigationAction.request.mainDocumentURL` is not also upgraded to https, therefore on the first refresh `url` has https and `mainDocumentURL` has http. These two properties become aligned once the page is refreshed once.