feat(pwa): Network-First 서비스 워커 — 홈화면 앱 자동 갱신
- sw.js: Network-First 캐시 전략 (GET + same-origin + res.ok만 캐시) - tkfb-core.js: SW 등록 + 업데이트 감지 시 자동 새로고침 (최초 설치 시 토스트 방지: controller 체크) - manifest.json: start_url → dashboard-new.html - nginx: sw.js, manifest.json no-cache 헤더 - 배포 시 sw.js의 APP_VERSION만 변경하면 전 사용자 자동 갱신 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -18,6 +18,14 @@ server {
|
||||
add_header Cache-Control "no-store, no-cache, must-revalidate";
|
||||
}
|
||||
|
||||
# SW, manifest 캐시 비활성화 (PWA 업데이트 즉시 반영)
|
||||
location = /sw.js {
|
||||
add_header Cache-Control "no-cache, no-store, must-revalidate";
|
||||
}
|
||||
location = /manifest.json {
|
||||
add_header Cache-Control "no-cache, no-store, must-revalidate";
|
||||
}
|
||||
|
||||
# 정적 파일 캐시 (JS, CSS, 이미지 등)
|
||||
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf)$ {
|
||||
expires 1h;
|
||||
|
||||
Reference in New Issue
Block a user