Please see the previous answer. As I mentioned there, for production you should control caching on the server-side. Also, the flutter_service_worker.js might cache the main.dart.js file locally and serve it from the cache.

As far as I see in the newer index.html files that Flutter generates when creating new projects, the caching strategy for the Service Worker is to fetch resources from the cache then, if that fails, fetch them from the network.

I’ll revisit the article and update it as soon as possible. When I first wrote it, as you can see from the index.html structure, there were no Service Workers involved.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store