improve cachebusters

This commit is contained in:
ed 2024-04-06 00:27:06 +00:00
parent 59a53ba9ac
commit e6ba065bc2
3 changed files with 4 additions and 7 deletions

View file

@ -4238,7 +4238,7 @@ var showfile = (function () {
qsr('#prism_css');
var el = mknod('link', 'prism_css');
el.rel = 'stylesheet';
el.href = SR + '/.cpr/deps/prism' + (light ? '' : 'd') + '.css';
el.href = SR + '/.cpr/deps/prism' + (light ? '' : 'd') + '.css?_=' + TS;
document.head.appendChild(el);
};
@ -4861,7 +4861,7 @@ var thegrid = (function () {
}
ihref = SR + '/.cpr/ico/' + ext;
}
ihref = addq(ihref, 'cache=i&_=' + ACB);
ihref = addq(ihref, 'cache=i&_=' + ACB + TS);
if (CHROME)
ihref += "&raster";

View file

@ -780,7 +780,7 @@ function up2k_init(subtle) {
setTimeout(function () {
if (WebAssembly && !hws.length)
fetch(SR + '/.cpr/w.hash.js' + CB);
fetch(SR + '/.cpr/w.hash.js?_=' + TS);
}, 1000);
function showmodal(msg) {
@ -1349,7 +1349,7 @@ function up2k_init(subtle) {
if (WebAssembly && !hws.length) {
for (var a = 0; a < Math.min(navigator.hardwareConcurrency || 4, 16); a++)
hws.push(new Worker(SR + '/.cpr/w.hash.js' + CB));
hws.push(new Worker(SR + '/.cpr/w.hash.js?_=' + TS));
console.log(hws.length + " hashers");
}

View file

@ -16,7 +16,6 @@ var wah = '',
NOAC = 'autocorrect="off" autocapitalize="off"',
L, tt, treectl, thegrid, up2k, asmCrypto, hashwasm, vbar, marked,
T0 = Date.now(),
CB = '?_=' + Math.floor(T0 / 1000).toString(36),
R = SR.slice(1),
RS = R ? "/" + R : "",
HALFMAX = 8192 * 8192 * 8192 * 8192,
@ -52,8 +51,6 @@ catch (ex) {
}
try {
CB = '?' + document.currentScript.src.split('?').pop();
if (navigator.userAgentData.mobile)
MOBILE = true;