서비스워커 자산 캐시 제거
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
}
|
||||
|
||||
window.addEventListener('load', function () {
|
||||
navigator.serviceWorker.register('/sw.js').catch(function () {});
|
||||
navigator.serviceWorker.register('/sw.js?v=20260721_nocache1').then(function (registration) {
|
||||
if (registration && typeof registration.update === 'function') registration.update();
|
||||
}).catch(function () {});
|
||||
});
|
||||
})();
|
||||
|
||||
+8
-6
@@ -1,9 +1,11 @@
|
||||
<?php
|
||||
require_once __DIR__ . '/../app/lib/db.php';
|
||||
require_once __DIR__ . '/../app/lib/auth.php';
|
||||
require_once __DIR__ . '/../app/lib/helpers.php';
|
||||
|
||||
if (!empty($_SESSION['user_id'])) {
|
||||
require_once __DIR__ . '/../app/lib/db.php';
|
||||
require_once __DIR__ . '/../app/lib/auth.php';
|
||||
require_once __DIR__ . '/../app/lib/helpers.php';
|
||||
|
||||
send_private_no_store_headers();
|
||||
|
||||
if (!empty($_SESSION['user_id'])) {
|
||||
header('Location: /dashboard.php');
|
||||
exit;
|
||||
}
|
||||
@@ -78,7 +80,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
|
||||
<link href="/assets/vendor/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="/assets/app.css" rel="stylesheet">
|
||||
<script src="/assets/asset-reload.js?v=20260721_autotoken1" data-service="financial" defer></script>
|
||||
<script src="/assets/asset-reload.js?v=20260721_nocache1" data-service="financial" defer></script>
|
||||
<script src="https://chaegeon.com/log/bancheck.min.js?_=<?php echo time(); ?>"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
+8
-6
@@ -1,9 +1,11 @@
|
||||
<?php
|
||||
require_once __DIR__ . '/../app/lib/db.php';
|
||||
require_once __DIR__ . '/../app/lib/auth.php';
|
||||
require_once __DIR__ . '/../app/lib/helpers.php';
|
||||
|
||||
if (!empty($_SESSION['user_id'])) {
|
||||
require_once __DIR__ . '/../app/lib/db.php';
|
||||
require_once __DIR__ . '/../app/lib/auth.php';
|
||||
require_once __DIR__ . '/../app/lib/helpers.php';
|
||||
|
||||
send_private_no_store_headers();
|
||||
|
||||
if (!empty($_SESSION['user_id'])) {
|
||||
header('Location: /dashboard.php');
|
||||
exit;
|
||||
}
|
||||
@@ -87,7 +89,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
<link rel="manifest" href="/manifest.webmanifest">
|
||||
<link href="/assets/vendor/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="/assets/app.css" rel="stylesheet">
|
||||
<script src="/assets/asset-reload.js?v=20260721_autotoken1" data-service="financial" defer></script>
|
||||
<script src="/assets/asset-reload.js?v=20260721_nocache1" data-service="financial" defer></script>
|
||||
<script src="https://chaegeon.com/log/bancheck.min.js?_=<?php echo time(); ?>"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
+5
-16
@@ -1,13 +1,6 @@
|
||||
const CACHE_NAME = 'financial-static-v1';
|
||||
const CACHE_NAME = 'financial-offline-v20260721-nocache1';
|
||||
const STATIC_ASSETS = [
|
||||
'/offline.html',
|
||||
'/assets/vendor/bootstrap.min.css',
|
||||
'/assets/vendor/bootstrap.bundle.min.js',
|
||||
'/assets/vendor/chart.umd.js',
|
||||
'/assets/app.css',
|
||||
'/assets/pwa.js',
|
||||
'/favicon.png?v=2',
|
||||
'/manifest.webmanifest'
|
||||
'/offline.html'
|
||||
];
|
||||
|
||||
self.addEventListener('install', event => {
|
||||
@@ -45,16 +38,12 @@ self.addEventListener('fetch', event => {
|
||||
return;
|
||||
}
|
||||
|
||||
if (url.pathname.startsWith('/assets/vendor/') || url.pathname === '/assets/app.css' || url.pathname === '/assets/pwa.js' || url.pathname === '/manifest.webmanifest' || url.pathname === '/favicon.png') {
|
||||
if (request.mode === 'navigate') {
|
||||
event.respondWith(
|
||||
caches.match(request).then(cached => cached || fetch(request))
|
||||
fetch(request, { cache: 'no-store' }).catch(() => caches.match('/offline.html'))
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
if (request.mode === 'navigate') {
|
||||
event.respondWith(
|
||||
fetch(request).catch(() => caches.match('/offline.html'))
|
||||
);
|
||||
}
|
||||
event.respondWith(fetch(request, { cache: 'no-store' }));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user