I'm creating an app for iPhone, which is a browser window within the app. Now, since there is no back button, I programmed the following to show one, which works fine:
<head>
...
<script>
function goBack() {
window.history.back()
}
</script>
</head>
<body>
<body>
<button onclick="goBack()">Go Back</button>
</body>
I would like to hide the button on the first page, as it messes up its design. Is there a way to do this, possibly by checking that there is no history or back page available.
I've looked into this question, but couldn't make it work.