You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to some cache issues from browsers, when we do an update by replacing the WASM binary and its JS binding file, even by clearing the cache of the browser, sometimes the WASM isn't updated, same for JS file and this can create unexpected errors.
The proposal is to add a feature/option when building with wasm-pack to append the hash of (WASM + JS) in the filename of both to be sure that the browser will ALWAYS refetch the new files without relying on the cache.
💻 Basic example
Create a web application using WASM, you make a new version and you upload it to your website again, but unfortunately, the browser keep the old version, and sometimes even when you clear the browser cache or due to Cloudflare cache too.
Having a hash would make any update much easier for web applications.
A custom script could be done to have such behavior, but maybe having a feature directly in wasm-pack would be much better as I'm sure others would appreciate it.
💡 Feature description
Due to some cache issues from browsers, when we do an update by replacing the WASM binary and its JS binding file, even by clearing the cache of the browser, sometimes the WASM isn't updated, same for JS file and this can create unexpected errors.
The proposal is to add a feature/option when building with
wasm-pack
to append the hash of (WASM + JS) in the filename of both to be sure that the browser will ALWAYS refetch the new files without relying on the cache.💻 Basic example
Create a web application using WASM, you make a new version and you upload it to your website again, but unfortunately, the browser keep the old version, and sometimes even when you clear the browser cache or due to Cloudflare cache too.
Having a hash would make any update much easier for web applications.
A custom script could be done to have such behavior, but maybe having a feature directly in
wasm-pack
would be much better as I'm sure others would appreciate it.cc @fzyzcjy
The text was updated successfully, but these errors were encountered: