iOS disables Javascript in iframes when navigating back to a page
Opened this issue · 0 comments
kamranayub commented
The issue is documented here:
The workaround is to add this to the page hosting the iframes (note: you do not need the body attribute on iOS 5.1+):
<script type="text/javascript">
if ((/iphone|ipod|ipad.*os 5/gi).test(navigator.appVersion)) {
window.onpageshow = function(evt) {
// If persisted then it is in the page cache, force a reload of the page.
if (evt.persisted) {
document.body.style.display = "none";
location.reload();
}
};
}
</script>
I've confirmed this works around the issue on iOS 5.1+.