John5269257
Posts: 0
Joined: Mon Jun 17, 2013 11:04 am

navigateTo vs location.href

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

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

navigateTo vs location.href

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).

John5269257
Posts: 0
Joined: Mon Jun 17, 2013 11:04 am

navigateTo vs location.href

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

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

navigateTo vs location.href

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.

John5269257
Posts: 0
Joined: Mon Jun 17, 2013 11:04 am

navigateTo vs location.href

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

Return to “Issues”