title: How to detect redirect in a UIWebView
body: <p>I am using a UIWebView as an embedded browser within my app. The problem I have is tracking the URL that should be displayed in the URL bar.</p>
  
  <p>When doing a Google search, the results page often generates links like this:</p>
  
  <p><a href="http://www.google.com/url?sa=t&amp;source=web&amp;cd=1&amp;ved=0CC4QFjAA&amp;url=http%3A%2F%2Fen.wikipedia.org%2Fwiki%2FDog&amp;rct=j&amp;q=dogs&amp;ei=27XeTc6RFIWEvAO858DHBQ&amp;usg=AFQjCNGkEDcWzea4pSlurHhcuQfqFcp_pw">http://www.google.com/url?sa=t&amp;source=web&amp;cd=1&amp;ved=0CC4QFjAA&amp;url=http%3A%2F%2Fen.wikipedia.org%2Fwiki%2FDog&amp;rct=j&amp;q=dogs&amp;ei=27XeTc6RFIWEvAO858DHBQ&amp;usg=AFQjCNGkEDcWzea4pSlurHhcuQfqFcp_pw</a></p>
  
  <p>When the user clicks this link, the UIWebView first reports this link and then the redirected link in <code>shouldStartLoadWithRequest:navigationType:</code>.</p>
  
  <p>How can I tell this is a redirect as opposed to some supplementary site being loaded for images or other elements on the page? As it stands my URL bar is displaying the long link from Google in the above example rather than updating to the Wikipedia URL.</p>