I’m using requireJS & Jquery Mobile.
I some areas off my app I’m doing a full page refresh (such as login/logout user). However, sometimes my plain vanilla
window.location.href = 'index.cfm'
which I’m using to refresh doesn’t work on iPad (running iOS3).
It’s hard to pin down and debug, because I’m getting no error message in Mobile Safari and on desktop this never happens. Also, it usually happens the first time I fire up the application, so I thought it would be session related (running Coldfusion8/MySQL backend). But since everything works on desktop (even IE8…) it can’t be some back end issue, can it?
The only thing I notice is that if the page load works, the title changes, then the spinner shows indicating page content is being loaded. If it doesn’t work, the title changes and the spinner never shows, so I’m assuming the page content is not being loaded. This only seems to happen when I log in/out, which are the only two instances, where I’m using window.location.href
Question:
Any ideas how to debug this? What could be reasons this doesn’t work? I have disabled pushstate and am wondering if a mere index.cfm vs a full path is the issue, but I’m having trouble to reproduce, so maybe someone can give me hint in another direction?
Thanks!
Any ideas how to debug this?
Yes, you can give weinre a try.
What could be reasons this doesn’t work?
The reason is not that obvious to see. But I suggest you to use entire
hrefinstead ofindex.cfm. If you just want to reload, uselocation.reload([true/false]). Or you can change thepathnameoflocation. Check the documentation of window.location for more details.