@webqit/webflo 0.8.58-0 → 0.8.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -133,7 +133,7 @@ export default function(layout, params) {
|
|
|
133
133
|
// Thus the origin server would still not be contacted by the self.fetch() below, leading to inconsistencies in responses.
|
|
134
134
|
// So, we detect this scenerio and avoid it.
|
|
135
135
|
if (evt.request.mode === 'navigate' && evt.request.cache === 'force-cache' && evt.request.destination === 'document') {
|
|
136
|
-
return cache_fetch(evt,
|
|
136
|
+
return cache_fetch(evt/** , truecacheRefresh */);
|
|
137
137
|
}
|
|
138
138
|
if (_any((params.cache_first_url_list || []).map(c => c.trim()).filter(c => c), pattern => Minimatch.Minimatch(evt.request.url, pattern))) {
|
|
139
139
|
return cache_fetch(evt, true/** cacheRefresh */);
|
|
@@ -144,6 +144,9 @@ export default function(layout, params) {
|
|
|
144
144
|
return network_fetch(evt);
|
|
145
145
|
};
|
|
146
146
|
|
|
147
|
+
//evt.request.mode navigate evt.request.cache force-cache evt.request.destination document request.headers.get('Accept') text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
|
|
148
|
+
//evt.request.mode navigate evt.request.cache force-cache evt.request.destination document request.headers.get('Accept') text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
|
|
149
|
+
|
|
147
150
|
const getCacheName = request => request.headers.get('Accept') === 'application/json'
|
|
148
151
|
? params.cache_name + '_json'
|
|
149
152
|
: params.cache_name;
|