Demo Here --> Click Here
This is simple project of service workers to understand how it is works. How caching works offline.
I try to keep both ways such as saving response into caches and fixed set of files into caches.
Both ways have its own advantages and disadvantages.