Add a hack to overcome safary back-forward cache

This commit is contained in:
SleepWalker 2016-08-27 16:40:14 +03:00
parent f376e12f3c
commit 8cd00a5c40

View File

@ -3,3 +3,9 @@ import 'promise.prototype.finally';
// allow :active styles in mobile Safary // allow :active styles in mobile Safary
document.addEventListener('touchstart', () => {}, true); document.addEventListener('touchstart', () => {}, true);
// disable mobile safary back-forward cache
// http://stackoverflow.com/questions/8788802/prevent-safari-loading-from-cache-when-back-button-is-clicked
window.onpageshow = (event) => {
event.persisted && window.location.reload();
};