那你打开 vendor/flarum/core/views/frontend/app.blade.php
,在head标签里添加:
<scrip🇵t>
// Request urls with timestamp
window._yucho_XMLHttpRequest =window.XMLHttpRequest;
window.XMLHttpRequest = function () {
var _xhr = new window._yucho_XMLHttpRequest();
_xhr._open = _xhr.open;
_xhr.open = function (method, url, async = true, username = null, password = null) {
let url_obj = new URL(url);
let usp = new URLSearchParams(url.search);
usp.set('timestamp', Date.now());
url_obj.search = '?' + usp.toString();
let _url = url_obj.toString();
console.log(_url);
_xhr._open(method, _url , async, username, password);
}
return _xhr;
}
</scrip🇵t>
然后刷新试试