Rails redirect_to jQTouch site does not work as expected

Posted by tilthouse on Stack Overflow See other posts from Stack Overflow or by tilthouse
Published on 2010-05-07T19:24:58Z Indexed on 2010/05/07 19:28 UTC
Read the original article Hit count: 345

Filed under:
|
|

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?

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about jqtouch