Skip to content

Commit 03d1e31

Browse files
committed
broaden service worker caching
1 parent bb802c6 commit 03d1e31

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

_config.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,11 @@ markdown:
9999
offline:
100100
maximumFileSizeToCacheInBytes: 10485760
101101
staticFileGlobs:
102-
- public/**/*.{js,html,css,png,jpg,gif,svg,eot,ttf,woff,json,xml}
102+
- public/**/*.{js,html,css,png,jpg,jpeg,gif,svg,eot,ttf,woff,woff2,json,xml}
103103
stripPrefix: public
104104
verbose: true
105105
runtimeCaching:
106+
# Ad Sources - should be networkFirst
106107
- urlPattern: /*
107108
handler: networkFirst
108109
options:
@@ -111,6 +112,11 @@ offline:
111112
handler: networkFirst
112113
options:
113114
origin: ad.doubleclick.net
115+
- urlPattern: /*
116+
handler: networkFirst
117+
options:
118+
origin: srv.carbonads.net
119+
# CDNs - should be cacheFirst, since they should be used specific versions so should not change
114120
- urlPattern: /*
115121
handler: cacheFirst
116122
options:
@@ -123,6 +129,14 @@ offline:
123129
handler: cacheFirst
124130
options:
125131
origin: fonts.gstatic.com
132+
- urlPattern: /*
133+
handler: cacheFirst
134+
options:
135+
origin: cdnjs.cloudflare.com
136+
- urlPattern: /*
137+
handler: cacheFirst
138+
options:
139+
origin: maxcdn.bootstrapcdn.com
126140

127141
# Deployment
128142
## Docs: http://zespia.tw/hexo/docs/deployment.html

0 commit comments

Comments
 (0)