Docs: the web hosting guide matches what the build ships (#164, #165, #174, #180)

- #174: the file names are fixed (effectcraft_web.js, effectcraft_web_bg.wasm, worker.js,
  sw.js…), not content-hashed, so the guide's year-long immutable caching kept returning
  visitors on the old release after an in-place upgrade. The guide, nginx example, _headers
  and .htaccess now revalidate (no-cache) the .wasm, .js and index.html, and suggest a
  versioned path for longer caching. The file table lists the real files.
- #180: the .wasm is about 58 MB (17 MB gzip, 10 MB Brotli) for v0.3.1, not 13 MB / 5 MB;
  docs/web.md's 38 MB figure is updated too.
- #165: preferences live in the origin's browser storage (OPFS, IndexedDB or memory), not
  localStorage.
- #164: relative URLs come from the page itself (and package.sh's check), not a Trunk.toml
  that doesn't exist.
The iframe example's title no longer says image editor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
bflatastic
2026-10-07 13:56:23 +07:00
co-authored by Claude Opus 5.5
parent b09f06f417
commit 120c7ec4e1
4 changed files with 37 additions and 26 deletions
+2 -4
View File
@@ -7,10 +7,8 @@ AddType text/javascript .js
</IfModule>
<IfModule mod_headers.c>
<FilesMatch "\.(wasm|js)$">
Header set Cache-Control "public, max-age=31536000, immutable"
</FilesMatch>
<FilesMatch "^index\.html$">
# The file names don't change between releases: revalidate them (HOSTING.md).
<FilesMatch "(\.(wasm|js)|^index\.html)$">
Header set Cache-Control "no-cache"
</FilesMatch>
</IfModule>