Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How could I cache the messages.js? #51

Open
terdong opened this issue May 2, 2019 · 4 comments
Open

How could I cache the messages.js? #51

terdong opened this issue May 2, 2019 · 4 comments

Comments

@terdong
Copy link

terdong commented May 2, 2019

Every time Loading a page, a browser gets always a new messages.js. I think It is wasting packets.

@julienrf
Copy link
Owner

julienrf commented May 2, 2019

You can use any caching system like the one provided by Play: https://www.playframework.com/documentation/2.7.x/ScalaCache

Where precisely do you want to cache? On the server’s memory? On the client’s browser cache?

@terdong
Copy link
Author

terdong commented May 2, 2019

Thank you for your quick reply.
Of course I want browser cache. Builded scalajs is cached in browser but messagesjs.
I know how to cache it on the server.

@julienrf
Copy link
Owner

julienrf commented May 2, 2019

Then you would have to use the Cache-Control or ETag headers, in your response.

@terdong
Copy link
Author

terdong commented May 2, 2019

Oh I got it. Thanks. 👍

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

No branches or pull requests

2 participants