Service Worker
Service Worker
Setting up a Service Worker with Hugo
Static sites are fast, we all generally agree to that, but they could be faster… One way we can achieve this is through a good service worker led caching strategy, for example, pre-fetching resources that the user is likely to need in the near future, such as the next few pictures in a photo album.
In this post we’ll walk through how to build out a basic service worker for a Hugo website (which is largely similar to the use of service workers in any other context).