diff --git a/src/views/portal/case/Detail.vue b/src/views/portal/case/Detail.vue index 0d660168..7ccef57f 100644 --- a/src/views/portal/case/Detail.vue +++ b/src/views/portal/case/Detail.vue @@ -563,22 +563,26 @@ export default { xmlhttp.abort(); }, 5000); // 1. 拼接随机参数(时间戳+随机数,确保URL唯一,破缓存) - const url = - window.location.protocol + - "//uapi.boe.com.cn/500.html?t=" + - Date.now() + - Math.random(); + // const url = + // window.location.protocol + + // "//uapi.boe.com.cn/500.html?t=" + + // Date.now() + + // Math.random(); // 2. 打开 HEAD 请求(URL已带随机参数) - xmlhttp.open("HEAD", url, true); + //xmlhttp.open("HEAD", url, true); // 3. 设置禁用缓存的请求头(覆盖现代浏览器+老IE+代理) - xmlhttp.setRequestHeader( - "Cache-Control", - "no-cache, no-store, must-revalidate" + // xmlhttp.setRequestHeader( + // "Cache-Control", + // "no-cache, no-store, must-revalidate" + // ); + // xmlhttp.setRequestHeader("Pragma", "no-cache"); // IE兼容 + // xmlhttp.setRequestHeader("Expires", "0"); // 禁止过期缓存复用 + xmlhttp.open( + "HEAD", + window.location.protocol + "//uapi.boe.com.cn/500.html", + true ); - xmlhttp.setRequestHeader("Pragma", "no-cache"); // IE兼容 - xmlhttp.setRequestHeader("Expires", "0"); // 禁止过期缓存复用 - // xmlhttp.open("HEAD", window.location.protocol + "//uapi.boe.com.cn/500.html", true); xmlhttp.send(); xmlhttp.onreadystatechange = function () { if (xmlhttp.readyState == 4) { diff --git a/src/views/study/coursenew.vue b/src/views/study/coursenew.vue index 1de3c7a0..07139bd4 100644 --- a/src/views/study/coursenew.vue +++ b/src/views/study/coursenew.vue @@ -2000,22 +2000,26 @@ xmlhttp.abort(); }, 1000); // 1. 拼接随机参数(时间戳+随机数,确保URL唯一,破缓存) - const url = - window.location.protocol + - "//uapi.boe.com.cn/500.html?t=" + - Date.now() + - Math.random(); - // 2. 打开 HEAD 请求(URL已带随机参数) - xmlhttp.open("HEAD", url, true); + // const url = + // window.location.protocol + + // "//uapi.boe.com.cn/500.html?t=" + + // Date.now() + + // Math.random(); + // // 2. 打开 HEAD 请求(URL已带随机参数) + // xmlhttp.open("HEAD", url, true); // 3. 设置禁用缓存的请求头(覆盖现代浏览器+老IE+代理) - xmlhttp.setRequestHeader( - "Cache-Control", - "no-cache, no-store, must-revalidate" + // xmlhttp.setRequestHeader( + // "Cache-Control", + // "no-cache, no-store, must-revalidate" + // ); + // xmlhttp.setRequestHeader("Pragma", "no-cache"); // IE兼容 + // xmlhttp.setRequestHeader("Expires", "0"); // 禁止过期缓存复用 + xmlhttp.open( + "HEAD", + window.location.protocol + "//uapi.boe.com.cn/500.html", + true ); - xmlhttp.setRequestHeader("Pragma", "no-cache"); // IE兼容 - xmlhttp.setRequestHeader("Expires", "0"); // 禁止过期缓存复用 - // xmlhttp.open("HEAD", window.location.protocol + "//uapi.boe.com.cn/500.html", true); xmlhttp.send(); xmlhttp.onreadystatechange = function () { if (xmlhttp.readyState == 4) {