Skip to content
This repository has been archived by the owner on Sep 10, 2022. It is now read-only.

Commit

Permalink
Add comment to dynamic cache to explain custom code over cache.addAll()
Browse files Browse the repository at this point in the history
  • Loading branch information
surma committed Jun 3, 2016
1 parent 49c8194 commit 03f3a51
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "css-triggers",
"version": "2.1.3",
"version": "2.1.4",
"private": true,
"engines": {
"node": ">=0.10.0"
Expand Down
3 changes: 3 additions & 0 deletions src/scripts/sw.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ function cacheStaticFiles() {
function cacheDynamicFiles() {
return caches.open(DYNAMIC_CACHE)
.then(function(cache) {
// We are not using cache.addAll() here because that would stop all
// caching on a non 2xx status code. 404.html will be delivered with a
// 404 status code, and we want to cache it anyways.
return DYNAMIC_FILES.map(url => {
return fetch(url)
.then(
Expand Down

0 comments on commit 03f3a51

Please sign in to comment.