From the course: JavaScript: Service Workers

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Summary of cache strategies

Summary of cache strategies - JavaScript Tutorial

From the course: JavaScript: Service Workers

Start my 1-month free trial

Summary of cache strategies

- [Instructor] Let's analyze all the Cache Strategies that we have been seeing during this chapter. We have seen that we can precache typically on the install event, then we have to deliver those assets to the browser cache first, network first stale while revalidate and any combination that we can create because we can create our own strategy. For example, we can do network first but also update resources that are not in the cache. We can do several strategies per route or per destination of the resource such as if it's a style, if it's an emash, we can also create dyno and maximum of emashes that we want and store in the cache so we can create our own algorithm. So when we are precaching, basically the service worker is downloading the resources from the server, in this case expressed as that little block with Res, that's resource and downloading that resource in the app cache. When we are using cache first and we do have the resource in the cache storage, the problem that appears…

Contents