service workers and cache on WiseJ


Would it be possible to get a how-to/best practices guide for setting up service workers and server-cache settings to maximize page load times? esp for 3G/4g. or some  service worker sample code that works out-of-box for WiseJ.

I’ve tried wrapping my head around it many times, broken my WiseJ app several times, and I’m wondering if there are best practices to follow.



  • You must to post comments

Right, I am wondering about the best practices to configure cache on an IIS web server to work with WiseJ.

For example, I had configured “HTTP Output caching” under IIS Manager by setting file types *.css *.js, etc, but I still had static assets (*.js etc) that were not being cached, but I fixed that by adding

<clientCache cacheControlMode=”UseMaxAge” cacheControlMaxAge=”30.00:00:00″ />

to my web.config file. But it seems this is not right use of etag?


I still now have these WiseJ managed resources that seem to never be cached no matter what — based on your explanation I am guessing this is not the expected behavior  (via

So it seems the browser will be forced to fetch the bootstrapper everytime (confirmed in network tab and Lighthouse). Per an earlier email you told me to exclude the .wx extension from “HTTP Output Caching”. In an earlier thread ( you said these files were cached but I can’t get it to work.


About Service Workers — -I know WiseJ doesn’t use Service Workers… the WebWorker example is not a service worker in the same sense as a PWA service worker as indicated by the guide. I’ve read the guide but had trouble implementing it.  The issues are complicated by server cache.



  • Luca (ITG)
    When the ETag matches the file is not downloaded again and it’s read from the local cache. You cannot alter the cache for .wx files or it will break the application. The tools that check the cache don’t know about Etag.
  • You must to post comments

Wisej doesn’t handle the browser cache. I don’t think there is a way to affect the browser cache in javascript. For the server side and only for Wisej managed resources we generetae ETags. There is nothing you need to do to manage that.

For all resources not managed by Wisej, which is every URL not ending with .wx, the caching method is managed by the web server.

Wisej doesn’t use service workers. There is a downloadable service worker extension and example in github. For a detailed service worker guide I found this: but it’s entirely out of the wisej scope.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.