mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 00:52:16 -06:00
improve cachebusters
This commit is contained in:
parent
59a53ba9ac
commit
e6ba065bc2
|
@ -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";
|
||||
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue