This is the right way. The webView argument provided in this delegate method allows you to access the UIWebView that launched the request. As a side note, this method is called when loading images, scripts, and other resources on a page (once per resource). To ensure that the page is complete, check the loading property.
source share