How could I cache the messages.js?
terdong opened this issue · comments
Every time Loading a page, a browser gets always a new messages.js. I think It is wasting packets.
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?
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.
Then you would have to use the Cache-Control or ETag headers, in your response.
Oh I got it. Thanks. 👍