all articles

chrome on iphone6plus cannot reload(true)

2016-09-16 @sunderls

iOS8.3 iPhone6Plus chrome reload js

description

well iOS is weird sometimes, and so is Chrome.

We can think chrome on iOS is very alike to safari, but sometimes they are not the same.

on iOS8.3 iphone6 plus, chrome cannot fight agains the cache using window.reload(true)

according to docs, window.reload(true) will reload the page regardless of the cache. but Chrome doesn't work. even if you use location.href = location.href

workaround

use cache buster

if (isChrome){
    location.href = [removed].href + '&t=' + Date.now();
} else {
    location.reload(true);
}