Last active
August 29, 2015 14:00
-
-
Save gobinathm/f593bed9fafb96295a06 to your computer and use it in GitHub Desktop.
Fix for those webpage that gets into trouble on ios safari due to pause / play behavior
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var userAgent = window.navigator.userAgent; | |
if (userAgent.match(/iPad/i) || userAgent.match(/iPhone/i)) { | |
window.onpageshow = function(event) { | |
if (event.persisted) { | |
window.location.reload() | |
} | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment