title: How to recognize file download
body: <p>I need to download files from internet inside the app using internal web browser and save them to some custom path.
  I think I should use UIWebViewDelegate and intercept lick clicks in </p>
  
  <pre><code>- (BOOL)webView:(UIWebView*)webView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType;
  </code></pre>
  
  <p>But here's my question: how can I know when the file is being downloaded (not just other webpage being opened).
  I thought I could parse the link and determine if the extension is png, doc or something. But the problem is I need to be able to download the files of any type.</p>
  
  <p>Thank you for any help.</p>
  
  <p>UPDATE:
  How can I recognize that this is link is actually for downloading. E.g. in this case -> etextlib.ru/Book/DownLoadPDFFile/19036 &lt;- the link does not have recognizable extension.</p>