Yeah i investigated the output DOM a little and i noticed that the index.html (startpage) is loaded 2 times. But how can that be?
At the start of my app the index.html is loaded. On that startpage i have code for it to change to my login page (login.html) if the user credentials are missing. So on the pageshow:
- if (!isLogedIn)
- {
- $.mobile.changePage('pages/login/login.html',{ changeHash: false});
- }
on the login.html i have this code after the form on the page is submitted:
- $.mobile.changePage('../../index.html',{ changeHash: false});
I use the changeHash: false because i don´t wan´t the user to be able to press the Android back button to go back to the login page.
For some reason after the login has been successful the user goes back to the index.html page and the index.html is inserted twice.
How can this be?