feat: add timestamp to URL to prevent caching

This commit is contained in:
Ivan K
2025-03-20 21:45:08 +03:00
parent aabe1c53dc
commit 5865706d0c

View File

@@ -774,6 +774,14 @@ let createStatusSection = function (podkopStatus, singboxStatus, podkop, luci, s
return view.extend({
async render() {
// Add timestamp to URL to prevent caching
if (!window.location.href.includes('_nocache=')) {
const timestamp = new Date().getTime();
const separator = window.location.href.includes('?') ? '&' : '?';
const newUrl = `${window.location.href}${separator}_nocache=${timestamp}`;
window.history.replaceState({}, document.title, newUrl);
}
document.head.insertAdjacentHTML('beforeend', `
<style>
.cbi-value {