Thank you, this does work. I have a few questions. Is the reason you are calling it "webView" because we are creating a new WebView? Because my original was called web1, and when the links open, they do not load the mobile version of the websites. So is it possible to preserve my web1 with the custom user-agent?
I was calling the WebView object webView both generically and because that's what the name of the property in my window controller is. When I paste the code above for you, I noticed at the last moment that you've called it web1, so I replaced webView with web1 in the code.
Where exactly in the code do mean by my calling it "webView"?
EDIT: I just tested the code. The custom user agent is being preserved, as I would have expected, because at no point is a new WebView object created. Some sites display a mobile version, some don't; but the behaviour is identical under iOS 4.
EDIT 2: Upon further investigation, the mobile version of news.google.com has exactly the same links the regular versions of news.google.com. It doesn't specially provide links to the mobile versions of the news items.
If a news website is setup to detected a mobile user agent, it will redirect you to the mobile version of the news item. If the news website is not so setup, you'll get the regular version of the new item.
For example -- I'm in Australia so these are Australian examples -- the Sydney Morning Herald automatically detected the mobile user agent and redirected me to the mobile version of the website. The Australian newspaper's website did not. I need to manually navigate to the mobile version.
So for websites that don't automatically detect and redirect, you'll need to translate the regular URL to the mobile URL. This translation will be specific to search news website.