Part 8—Taking the web offline
Application cache is deprecated. It is quite headache to maintain. Now we use Service Worker to cache offline file.
This feature is in the process of being removed from the Web platform. (This is a long process that takes many years.) Using any of the offline Web application features at this time is highly discouraged. Use service workers instead. — WHATWG spec
Service Worker is a proxy between browser and server. It can do much more than caching files. For example, it can run in background process and push notifications to your device.
The Google Chrome’s github page provides an example code on the offline capatability.
Note: But iOS has not supported Service Worker yet, so we still need to rely on the Application Cache to provide offline access in iOS.