mirror of
https://github.com/itdoginfo/podkop.git
synced 2025-12-06 11:36:50 +03:00
feat: add timestamp to URL to prevent caching
This commit is contained in:
@@ -774,6 +774,14 @@ let createStatusSection = function (podkopStatus, singboxStatus, podkop, luci, s
|
|||||||
|
|
||||||
return view.extend({
|
return view.extend({
|
||||||
async render() {
|
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', `
|
document.head.insertAdjacentHTML('beforeend', `
|
||||||
<style>
|
<style>
|
||||||
.cbi-value {
|
.cbi-value {
|
||||||
|
|||||||
Reference in New Issue
Block a user