feat(pwa): pass Samsung Internet install criteria
- index.html: legacy metas Samsung Internet/older Android require to treat the page as installable (mobile-web-app-capable, apple-mobile-web-app-*, application-name) - manifest.json: icons at 48/72/96/144/192/512 plus maskable 192/512 (every file's real pixel size matches the declared sizes), related_applications: [] - icons: derived the new sizes from the existing artwork (PIL, LANCZOS) - README: document the Samsung-specific requirement - VERSION bumped to 2026.11.24.5 Verified with CDP (Chrome + SamsungBrowser UA, 360x800): installabilityErrors [], all 8 icons load with matching dimensions, screenshots served as image/png, no horizontal overflow, service worker controlling the page.
This commit is contained in:
1 parent
084eb7dd8e
commit
ddec75b99e
9 files changed
+41
-3
No files matched your search
@@ -67,7 +67,8 @@ repo นี้ deploy เป็น **Compose application** บน Dokploy (serve
|
||||
|
||||
- **หน้าเดียว**: hash router (`#/`, `#/admin`) — เปลี่ยนหน้าไม่โหลดใหม่ (`performance.navigation` ไม่เพิ่ม, `timeOrigin` เดิม)
|
||||
- **ติดตั้งได้**: `manifest.json` (`display: standalone`, `start_url`/`scope` = `/`, `id` = `/`, ไอคอน 192/512 + maskable, `screenshots` แนวตั้ง/แนวนอน, `shortcuts`) ลิงก์ใน `index.html`
|
||||
- ต้องมีครบตามที่ Chrome/Samsung ตรวจ: HTTPS ที่ certificate ถูกต้อง · manifest ที่ parse ผ่าน (`Page.getAppManifest` → `errors: []`) · `Page.getInstallabilityErrors` → `[]` · service worker คุมหน้าอยู่ · ไอคอนเป็น PNG จริง (ไม่ใช่ SVG)
|
||||
- ต้องมีครบตามที่ Chrome/Samsung ตรวจ: HTTPS ที่ certificate ถูกต้อง · manifest ที่ parse ผ่าน (`Page.getAppManifest` → `errors: []`) · `Page.getInstallabilityErrors` → `[]` · service worker คุมหน้าอยู่ · ไอคอนเป็น PNG จริง (ไม่ใช่ SVG) และ **ขนาดจริงต้องตรงกับ `sizes` ที่ประกาศ** (48/72/96/144/192/512 + maskable 192/512)
|
||||
- **Samsung Internet ใช้ `<meta name="mobile-web-app-capable" content="yes">` + `application-name`** ประกอบการตัดสิน — ถ้าลบ meta พวกนี้จะขึ้น “ไม่ผ่านข้อกำหนด” ทั้งที่ manifest ครบ
|
||||
- **ออฟไลน์ได้**: `sw.js` precache shell ไว้ครบ เปิดแบบไม่มีเน็ตยังเห็นรายการ (ข้อมูลจากสำเนา JSON/localStorage)
|
||||
- **อัปเดตเอง**: `ui/pwa.js` ลงทะเบียนด้วย `updateViaCache: "none"` แล้ว `update()` ตอนเปิดหน้า / ทุก 30 นาที / กลับมาโฟกัสแท็บ / ต่อเน็ตใหม่ · `sw.js` ใช้ `skipWaiting()` + `clients.claim()` → `controllerchange` สั่ง reload หน้าเอง (ชะงักเฉพาะตอนกำลังพิมพ์ในฟอร์ม แล้วทำต่อเมื่อเลิกพิมพ์)
|
||||
- cache เวอร์ชันเก่าถูกลบใน `activate` → ผู้ใช้ไม่ต้องล้างแคชเอง
|
||||
|
||||
Reference in new issue
Block a user