From 8cd00a5c405a64047e84e0a1598ed3e891bc621d Mon Sep 17 00:00:00 2001 From: SleepWalker Date: Sat, 27 Aug 2016 16:40:14 +0300 Subject: [PATCH] Add a hack to overcome safary back-forward cache --- src/polyfills.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/polyfills.js b/src/polyfills.js index 1e0d2a6..a0d34fc 100644 --- a/src/polyfills.js +++ b/src/polyfills.js @@ -3,3 +3,9 @@ import 'promise.prototype.finally'; // allow :active styles in mobile Safary 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(); +};