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.
Prepare the project - JavaScript Tutorial
From the course: JavaScript: Service Workers
Prepare the project
- [Instructor] In this chapter, we are going to work with cache storage. For working with cache storage, we are going to use a real project because that's how we can make an offline capable website or offline capable app. For that, you can open 0402 Begin from the project files. And there you will find four HTML files, three JavaScript files, and folders for CSS, images, and videos. It's a website for some California tours. If you open the terminal, we can serve the current folder and see this website in action. Now, we need to open this URL, the URL you see in the terminal, in the browser. And this is how it looks like. It has three links: Tools, mission, resources. And the index HTML, the homepage. In the homepage, we have some weather information that is using a current API, using the fetch API, to get the weather. If I refresh, you can see that information is coming dynamically from an API. If we open Developer Tools from the menu, Inspect, or More Tools, Developer Tools. When we…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
Understand the new Cache API5m 36s
-
(Locked)
Prepare the project4m 30s
-
(Locked)
Prefetch files on install5m 1s
-
(Locked)
Visualize your cache3m 37s
-
(Locked)
Implement a cache-first policy6m 12s
-
(Locked)
Implement a network-first policy5m 10s
-
(Locked)
Cache new elements after install5m 41s
-
(Locked)
Use stale-while-revalidate6m 46s
-
(Locked)
Deliver alternate content when offline6m 28s
-
(Locked)
Keep your storage clean5m 28s
-
(Locked)
Summary of cache strategies4m 36s
-
-
-
-