打破页面缓存

112 阅读1分钟
    // 打破页面缓存
    let time = parseInt(new Date().getTime(), 16);
    let hash = query.getQuery(location.href).hash; // 把url中的hash信息传入到新的url中
    history.replaceState(
        {},
        document.title,
        query.withMergeQuery(location.href, { preventBrowserCache: time }, hash)
    );