Problem with back button on phones

Problem with back button on phones

I've been developing a new site using Jquery Mobile and now that we are testing on smart phones I'm running into problems with navigation, specifically when somebody uses the Back button.

For example, you start on the landing page, you click on a link to go a another page. That page has a form which delivers you data when you submit.

Now you're on the results page, you click Back, you are on the correct page.

Now you click back again, which should take you to the starting landing page.

What we're seeing is it sending you to random pages, sometimes not even on our site!

I'm using

<link rel="stylesheet" href="/jquery.mobile-1.2.0/jquery.mobile-1.2.0.min.css" />
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
<script src="/jquery.mobile-1.2.0/jquery.mobile-1.2.0.min.js"></script>

in our header (we're loading jquery mobile locally).

I've tried adding data-ajax="false" on every link I can think of to prevent this odd behaviour and that didn't help.

So now I've removed that and added a simple page transition in its place (so we can see that indeed JQM is handling the page loads).

Same issues.

On a regular desktop using Firefox or Microsoft Internet Explorer, I don't see any navigation issues.

But on my windows 7.5 phone, an iphone, and a motorolla phone, when you hit the back button it's anybody guess where you will end up.

This is very confusing and doesn't provide a very smooth visit to our users.

Any suggestions?