I'm trying to solve this problem:
iOS 7 - is there a way to disable the swipe back and forward functionality in Safari?
I have custom navigation on swipe and if there is history in the tab mobile safari automatically goes back in history. Is there any way to clear the tab history or detect that tab history exists so that it can open the site in a new tab?
I don't believe you can clear the tab history, but you could check the history length with window.history.length
and open a new tab.