Well ,thanks hints provided drove me to this video . It's a really good explanation for services workers. My headache is findind away to do this on http pages seeing that service works for all their awesomeness only work for https pages.
If you works only evergreen browsers. I recommend you start learning Service Workers. But if you need now, I did a sample a short time ago maybe can help you.
Dong Nguyen
Web Developer
You should read "The offline cookbook" by Jake Archibald, that provides all necessary (visual) information about caching and syncing strategy for offline web apps.