Response.url 属性是独立的

Tags
webapi
Created
Mar 28, 2018 12:21 PM

Cache API 缓存 Response 时不会改变其中的内容:

caches.open('text').then(async c => {

const r = await fetch('/home');

await c.put(new Request('/test'), r);

const res = await c.match('/test');

await c.put(new Request('/test1'), res);

const res1 = await c.match('/test1');

console.log(res1.url);

});

SuperMade with Super