I have a very strange error. I have an webpage that runs in Appmode (when you add to homescreen on iOS). I have one A element that transfer to another page in the same domain (test2.html). If I click on it, the appmode is quited and a new browser window opens.
However if I make a location.href = 'test2.html' it works. And now the strange part, on test2.html I just have one A element with href="test1.html", and now it works.
I have a thesis that every link will work in your own domain if you sometime have done a location.href before clicking any other link.
My test case:
Test2.html
<a href="javascript:void();" onclick="transfer();">Test1</a>
<script>
function transfer(){
location.href = "test1.html";
}
</script>
Test1.html
<a href="test2.html">Test2</a>
You can change Test2 so it similar to Test1 and just change the href and it will broke.
I really have no ide why this is happening. Why does it work just after you have done a location.href in the same domain?