fix(scroll): mouse wheel did not scroll the page
main.agent-native-app-main is a scroll container (overflow-y:auto + overscroll-contain) whose content equals its own height, so it swallowed the wheel and the document never scrolled; the site wrapper's overflow-x:hidden also made its overflow-y compute to auto. Neutralise both scrollers so the document is the only scroller (overflow-x:clip keeps horizontal clipping). Cache safety: the patched CSS kept its old hashed filename, and nginx served /assets/* as immutable for a year, so visitors with the earlier CSS could never receive the fix. Renamed the stylesheet to a content hash and updated 34 HTML references, switched /assets/ to no-cache (revalidate, 304), bumped sw.js VERSION to v2.1.2. docs/deploy-dokploy.md updated.
This commit is contained in:
1 parent
ae34597847
commit
82374ebfdd
38 files changed
+46
-38
No files matched your search
@@ -54,11 +54,15 @@ PORT=31004 HOST_PORT=31004 PUBLIC_ORIGIN=https://staging.example.com docker comp
|
||||
|
||||
| path | Cache-Control |
|
||||
|---|---|
|
||||
| `/assets/*` (ชื่อมี hash) | `public, max-age=31536000, immutable` |
|
||||
| `/assets/*` (JS/CSS) | `no-cache` — แคชได้แต่ revalidate ทุกครั้ง |
|
||||
| รูป/ฟอนต์ | `public, max-age=2592000` |
|
||||
| HTML ทุกหน้า | `no-cache` (ต้อง revalidate) |
|
||||
| `sw.js`, `manifest.json` | `no-cache` |
|
||||
|
||||
> **ทำไม `/assets/` ไม่ใช้ `immutable`:** ในโหมด publish static export เราแก้ไฟล์ CSS/JS ด้วยมือโดยชื่อเดิมบ่อย
|
||||
> ถ้า cache ยาว เครื่องที่เคยโหลดจะค้างไฟล์เก่าเป็นปี (เคสจริง: fix scroll/wheel ไม่ถึงผู้ใช้)
|
||||
> เวลาแก้ CSS/JS ให้ **เปลี่ยนชื่อไฟล์เป็น hash ใหม่ + แก้ `<link>` ใน HTML** ด้วย แล้ว bump `VERSION` ใน `sw.js`
|
||||
|
||||
`sw.js` เป็น cache-first สำหรับ `/assets/*` → **ทุกครั้งที่แก้ CSS/JS ในไฟล์ export ต้อง bump `const VERSION` ใน `sw.js`**
|
||||
|
||||
## แก้โดเมน/ค่าในไฟล์ export
|
||||
|
||||
Reference in new issue
Block a user