Hacker News new | ask | show | jobs
by daleharvey 2961 days ago
The precursor to Service Worker is AppCache, purely a manifest that described how to cache things. It worked for the basic cases like SPA's, but feel apart when dealing with dynamic content.

Obviously this could all be solved by applications loading their content via a javascript cache, but then you are putting a hard dependency on javascript, service workers allow you do do the age old <img src="profile.jpg" its going to work in all the browsers, but if your browser supports service workers it can upgrade that <img src=" to load data from cache when offline

tl;dr service workers allow you to add dynamic caching to existing web content via progressive enhancement