Question: Is it possible to detect a page refresh within a Jquery mobile HTML5 page?

I am building a quiz as part of a client project - the quiz navigates through jquery mobile div pages within the one html page.. so for example if the user was on index.html#quizpage3 and refreshed I would like to detect the refresh and return the navigation to index.html.

Is this possible?

Cheers
Paul

Answer: 
My answer is similar to Patch's but all I did was add the following to the top of my local referenced js file before the $(document).ready line. You could also add it to an HTML script tag anywhere in the header I believe.

```
if (location.hash != "" && location.hash != "pageHome") {
    var url = location.href;
    url = url.replace(location.hash,"");
    location.replace(url);
}

```
I'm a little late but I ran with Patch's idea to create a very simple solution.
Throw this in a script tag or in your JS file before $(document).ready()

```
checkPage();

function checkPage() {
    var _hash = location.hash;

    if (_hash != '' && _hash != "#home") {
        var _url = location.href.replace(_hash, "");
        window.location.href = _url;
    }
}

```