Questions tagged [cacheapi]
49 questions
15
votes
2 answers
Overcoming the 50 MiB limitation on PWA cache for iOS
We are building a progressive web app for iOS devices and we know about the 50 MiB cache limitation imposed by the Safari web browser. How can we handle this limitation when we know that our app's service worker might have to cache data more than 50…

user444002
- 151
- 1
- 4
11
votes
3 answers
Wildcards in ServiceWorker / Cache API
I am using ServiceWorker and in dev mode works perfectly, my problem is that in production mode my bundle name is generated using hash, e.g. 1234das3123ad5.bundle.js, so the service worker is not caching it. My sw code looks…

Avraam Mavridis
- 8,698
- 19
- 79
- 133
8
votes
1 answer
Using Cache-API not possible in Safari/Chrome on IOS, is that correct?
Question
Can I or can I not use caching API with service workers on IOS in either Safari or Chrome as of IOS 13.1?
Background
I have a web app, that is to be used offline.
I use:
Serviceworker
Cache API
IndexedDB
Works in Chrome on…

Kjensen
- 12,447
- 36
- 109
- 171
6
votes
0 answers
How to undo navigator.storage.persist(() => {})
Is there a way to make cache storage box back to best-effort once is made persistent ?

Imamudin Naseem
- 1,604
- 18
- 21
4
votes
1 answer
PWA offline capability on data that frecuently changes
Are Progressive Web Apps offline capability a good idea on applications that display data that change frequently like a bank account balance?
If The user is using his PWA offline mode and navigates for example to the bank product balances section he…

Rafael Reyes
- 2,615
- 8
- 34
- 51
3
votes
0 answers
PWA: Let user download content for offline use
I am working on an app for museum visitors that shows multi media information about the objects of some expositions. An example could be the info page for the Mona Lisa of the Da Vinci exposition.
The app is realized as a PWA to enable offline…

Tobias Uhmann
- 2,757
- 2
- 25
- 35
3
votes
1 answer
service worker CacheAPI use `Time Cached` attribute with cache.matchAll
I am caching some data like thumbnails and also JSON in our web app.
Now I want to delete old data when I reach the disk space.
Chrome shows in his web tools (not perfectly, it doesn't show the correct time for self-created responses) the attribute…

masterwendu
- 31
- 4
3
votes
0 answers
Is there an axios cache adapter for Cache API?
Is there an extension for axios that uses Cache API to cache responses on requests with Cache API.
(Or maybe an example how to implement it yourself?)

marcusx
- 307
- 2
- 11
3
votes
1 answer
HTML Audio element source from cache
I am building a web application for playing some audio files offline. I have read and tested the Cache part of the Service Worker API, and I can easily add all my audio files to a named cache. However, the browser does not seem to use it when I add…

aweibell
- 405
- 1
- 5
- 14
3
votes
1 answer
Service worker automatic update process
I have a doubt about the service worker update process.
In my project there are 2 files related to sw:
"sw.js", placed in website root, will be NOT cached (by Cache API and Web Browser).
My service worker manages the cache of all statics files and…

Enricosoft
- 869
- 2
- 10
- 28
2
votes
1 answer
Trouble with Cloudflares Worker Cache API
I’ve now spent countless hours trying to get the cache API to cache a simple request. I had it working once in between but forgot to add something to the cache key, and now its not working anymore. Needless to say, cache.put() not having a return…

user13737110
- 23
- 4
2
votes
1 answer
@Cacheable annotation, using same value in a differents methods
I am trying to use the Spring @Cacheable annotation.
@Cacheable(value="users")
public List findAll() {
System.out.println("Looking for All users : ");
return userRepository.findAll();
}
@Override
@Cacheable(value="users") …

Ibtissam Ibtissama
- 159
- 1
- 15
2
votes
0 answers
Get response header of cached response inside service worker
I want to get the response headers of a cached response inside a service worker. The purpose of this is so that I can read a custom header called 'Modified' to see if it is necessary to fetch a new copy of the data by comparing it to the response…

jupitreas
- 56
- 2
2
votes
1 answer
Item cached in the cache storage under relative paths
I am trying to add some static pages to cache using standard technique in the install event of the service worker:
self.addEventListener('install',function(event) {
event.waitUntil(
caches.open(static_cache).then(function(cache){
…

Yuriy Galanter
- 38,833
- 15
- 69
- 136
2
votes
1 answer
What is the lifespan of assets cached by service worker?
Some of the articles I have read suggest that items cached by service worker (web Cache API) is stored in system forever.
I have come across a scenario when some of the cached resources are evicted automatically for users who revisit my website…

Imamudin Naseem
- 1,604
- 18
- 21