I'm new on service worker in my page i have images without extensions [*.jpg, *.png and etc] like this "www.domain.com/api/media/a2b93f21-1acf-4e5e-9b19-6d7c68aaadc2
" which i get them from API.
The following code work fine but not for this type of images
workbox.routing.registerRoute(
// Cache image files.
/\.(?:png|jpg|jpeg|svg|gif)$/,
// Use the cache if it's available.
new workbox.strategies.CacheFirst({
// Use a custom cache name.
cacheName: 'image-cache',
plugins: [
new workbox.expiration.Plugin({
// Cache only 20 images.
maxEntries: 20,
// Cache for a maximum of a week.
maxAgeSeconds: 7 * 24 * 60 * 60,
})
],
})
);
Any suggestion ?