This commit is contained in:
Jaeeun.Cho 2025-11-28 12:11:35 -05:00
commit ac902c3db4
1 changed files with 33 additions and 24 deletions

View File

@ -87,9 +87,9 @@
?> ?>
<link href="assets/css/mapMAPCSS.css" rel="stylesheet" type="text/css" > <link href="/assets/css/mapMAPCSS.css" rel="stylesheet" type="text/css" >
<!-- New2 --> <!-- New2 -->
<link href="assets/css/leftside-modal.css" rel="stylesheet"> <link href="/assets/css/leftside-modal.css" rel="stylesheet">
<!-- New2 --> <!-- New2 -->
<!--script src="https://polyfill.io/v3/polyfill.min.js?features=default"></script--> <!--script src="https://polyfill.io/v3/polyfill.min.js?features=default"></script-->
@ -2510,31 +2510,40 @@ document.addEventListener('DOMContentLoaded', () => {
}); });
async function forceRefresh() { async function forceRefresh() {
const cssFiles = [ if ('caches' in window) {
'assets/css/mapMAPCSS.css', const keys = await caches.keys();
'assets/css/main.css', await Promise.all(keys.map(key => caches.delete(key)));
'assets/css/leftside-modal.css' }
]; window.location.reload();
/*
const cssFiles = [
'mapMAPCSS.css',
'main.css',
'leftside-modal.css'
];
// CSS 강제 새로고침 cssFiles.forEach(file => {
cssFiles.forEach(file => { const oldLink = Array.from(document.querySelectorAll('link[rel="stylesheet"]'))
const link = document.querySelector(`link[href^="${file}"]`); .find(l => l.href.endsWith(file));
if (link) { if (oldLink) {
const href = link.href.split('?')[0]; const newLink = oldLink.cloneNode();
link.href = href + '?view=map&_=' + new Date().getTime(); newLink.href = oldLink.href.split('?')[0] + '?view=map&_=' + new Date().getTime();
} oldLink.parentNode.replaceChild(newLink, oldLink);
}); console.log(`CSS replaced: ${newLink.href}`);
} else {
console.warn(`CSS not found: ${file}`);
}
});
// 브라우저 캐시 삭제 if ('caches' in window) {
if ('caches' in window) { const keys = await caches.keys();
const keys = await caches.keys(); console.log('Cache keys found:', keys);
await Promise.all(keys.map(key => caches.delete(key))); await Promise.all(keys.map(key => caches.delete(key)));
} console.log('Caches cleared');
}
// 페이지 새로고침 console.log('CSS force refresh completed without page reload');
const url = new URL(window.location.href); */
url.searchParams.set('view', 'map'); // view=map 유지
window.location.href = url.toString();
} }
$('.point-overlay').on( $('.point-overlay').on(