I am trying browser Cache API mechanism, but the api which is going to be cached is using cookie authentication. And am receiving 'unauthorized-401' error message. I am suspecting the http cookie supposed to send for all the api request is not sending when i am calling from cache.add(apiurl)
if ('caches' in window) {
caches.open('cachename').then(cache => {
cache.add(apiUrl).then(() => {
//done!
})
});
}