Page 1 of 1

navigateTo vs location.href

Posted: Wed Oct 23, 2013 9:40 am
by John5269257

Hi
I'm having problems rendering pages with Appery.navigateTo(). In some devices the page I'm navigating to doesn't render properly.

After the failed rendering, the page renders when I hit reload.

The pages render properly when I use location.href to go to the html page name.
The problem with using location.href is the back button no longer show up on the target page.

I've seen references to parameters that can be passed to Appery.navigateTo(), and I've tried {domCache: false} with no success. Is there anything else that can force a 'harder' load?

Thanks
John


navigateTo vs location.href

Posted: Wed Oct 23, 2013 10:29 am
by Maryna Brodina

Hello! Could you clarify please? You've added Appery.navigateTo() on app page and it works on some devices, but on some devices doesn't work?
have you changed anything on Source tab (in particular JS or CSS).


navigateTo vs location.href

Posted: Wed Oct 23, 2013 6:17 pm
by John5269257

Hi Maryna,

Yes, it's odd, and seems to be a chrome on android thing, and intermittent too :(

I've decided to use location.href = "target.html" for all javascript-based page navigation, and I'm hand coding any back buttons I need.

I haven't changed anything in the source tab, but the whole app uses generic services working with local objects. It's as if sometimes localStorage isn't getting updated in time for it to be read by a page as it loads.

I don't have time to dig any deeper, I'm happy to live with my workround.

Thanks,
John


navigateTo vs location.href

Posted: Thu Oct 24, 2013 8:40 am
by Maryna Brodina

Hello! Most likely there is some problem with Chrome. Could you tell us your Android and Chrome version? We'll check if someone had this problem.


navigateTo vs location.href

Posted: Mon Oct 28, 2013 8:37 pm
by John5269257

Hi
Follow up that might help somebody. My pages call generic services which manipulate local json and populate 'success' with data for mapping. I've now attached these services to the 'Page Show' event rather than 'Load' and they work when I use Appery.navigateTo() - pages are populated properly :)

(I am not rendering all pages as one HTML file.)

Thanks
John