Skip to content

Conversation

IzioDev
Copy link
Contributor

@IzioDev IzioDev commented Oct 10, 2025

This should fix stale cache

@HocusLocusTee
Copy link
Collaborator

I had caching issues on browser (not just PWA).
We need probably need to make sure the index.html is not getting cached (and the generated service worker?)

We should be able to set this quite easily with a _headers file as specified here

@IzioDev
Copy link
Contributor Author

IzioDev commented Oct 12, 2025

I had caching issues on browser (not just PWA). We need probably need to make sure the index.html is not getting cached (and the generated service worker?)

We should be able to set this quite easily with a _headers file as specified here

Updated with this method

@HocusLocusTee
Copy link
Collaborator

Nice.

We could add this too?

/*.wasm
  Cache-Control: public, max-age=31536000, immutable

/*.png
  Cache-Control: public, max-age=604800

/*.svg
  Cache-Control: public, max-age=604800

@IzioDev
Copy link
Contributor Author

IzioDev commented Oct 13, 2025

Nice.

We could add this too?

/*.wasm
  Cache-Control: public, max-age=31536000, immutable

/*.png
  Cache-Control: public, max-age=604800

/*.svg
  Cache-Control: public, max-age=604800

Yes for png and svg 👍
Porbably yes also for wasm if we use a specific wasm file name, in case we update SDKs (as we did recently). One way of "fixing" this would be to use kaspa-${version}.wasm

@HocusLocusTee
Copy link
Collaborator

Nice.
We could add this too?

/*.wasm
  Cache-Control: public, max-age=31536000, immutable

/*.png
  Cache-Control: public, max-age=604800

/*.svg
  Cache-Control: public, max-age=604800

Yes for png and svg 👍 Porbably yes also for wasm if we use a specific wasm file name, in case we update SDKs (as we did recently). One way of "fixing" this would be to use kaspa-${version}.wasm

True. Up to you, I don't mind excluding it for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants