I have a Rails app with a jQTouch mobile site that is displayed if the user goes to m.blah.com. First, I detect the browser, then to a redirect_to m.blah.com if it's an iphone, etc. All well and good. When I use desktop Safari, this all works exactly right.
However, when I use an actual iPhone or the Apple iPhone Simulator, it does not. The mobile site appears to load without the browser actually doing the redirect. The URL in the browser is still www.
I am wondering if this behavior is due to Mobile Safari, or if it is 开发者_如何学Pythonsomehow jQTouch trying to load the page with AJAX, not a reload (which is odd as jQTouch hasn't been loaded at all before the redirect).
Any ideas?
We've experienced similar issues. Most of the time you can force the redirect by adding the :rel => "external" param to the redirect_to or Link_to call. Haven't quite sorted out exactly when this is required but it seems to resolve the majority of issues we have with dead links.
精彩评论