views:

217

answers:

1

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 somehow 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?

A: 

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.

Ken Toole