title: change user-agent for good
body: <p>I have been able to change the user-agent by using</p>
  
  <pre><code>- (BOOL)webView:(UIWebView *)webView2 shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType {
  
  NSMutableURLRequest *req = (NSMutableURLRequest *)request;
  NSString *versionString = [[NSBundle mainBundle] objectForInfoDictionaryKey:(NSString*)kCFBundleVersionKey];
  
  NSLog(@"user agent = %@", [req valueForHTTPHeaderField: @"User-Agent"]);
  
  if ([req valueForHTTPHeaderField:@"User-Agent"] != NULL) {
  
      [req setValue:[NSString stringWithFormat:@"%@ %@", versionString, [req valueForHTTPHeaderField:@"User-Agent"]] forHTTPHeaderField:@"User-Agent"];
      NSLog(@"user agent = %@", [req valueForHTTPHeaderField: @"User-Agent"]);
  
     return YES
      }
  }
  </code></pre>
  
  <p>But when I go to this website on the device <a href="http://whatsmyuseragent.com/" rel="nofollow">http://whatsmyuseragent.com/</a> my user-agent hasn't changed. Is there a way to change the user-agent for good?</p>