Mobile Safari uses a special caching mechanism Page Cache (here) which basically keeps the current page alive but hibernated when we navigate to another page. T
Page Cache
Another potential solution is to look at the event.persisted flag to determine if it's cached or not:
event.persisted
window.onpageshow = function(event) { if (event.persisted) { window.location.reload() } };