mirror of
https://github.com/storytold/effectcraft.git
synced 2026-10-14 19:27:05 -04:00
- #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 <[email protected]>
This commit is contained in:
1 parent
b09f06f417
commit
120c7ec4e1
4 files changed
+37
-26
No files matched your search
+5
-3
@@ -31,9 +31,11 @@ isolated like a production deployment should be. Any static server works
|
||||
(`python3 -m http.server -d target/web/dist 8765`); it must serve `.wasm` as `application/wasm`.
|
||||
Service workers need a secure context: `https://`, or `http://localhost` / `127.0.0.1`.
|
||||
|
||||
The release `.wasm` is about 38 MB before `wasm-opt` (code: the effects, codecs, the expression
|
||||
engine and the UI; data, mostly the bundled fonts; function names for readable panics). Served
|
||||
compressed it is a fraction of that, and the service worker caches it after the first visit.
|
||||
The release `.wasm` is about 58 MB before `wasm-opt` (v0.3.1; code: the effects, codecs, the
|
||||
expression engine and the UI; data, mostly the bundled fonts; function names for readable
|
||||
panics). Served compressed it is about 17 MB with gzip or 10 MB with Brotli, and the service
|
||||
worker caches it after the first visit. Its name doesn't change between releases, so hosts
|
||||
revalidate it rather than caching it for long (`packaging/web/README.md`).
|
||||
|
||||
On other targets the web crate holds only its portable storage model (`store.rs`, unit-tested by
|
||||
`cargo test --workspace`); `cargo xtask wasm` (part of `cargo xtask ci`) checks the whole crate,
|
||||
|
||||
Reference in new issue
Block a user