Skip to content
Advertisement

Tag: service-worker

Not allowed to load local resource: chrome-error://chromewebdata/favicon@2x.png chrome-error://chromewebdata/

I’m following PWA tutorial and the same way implemented offline storage. In addition to the specified error, I got the following warnings I have web manifest installed with content: I have these tags in my layout and corresponding images in specified folders. Answer I made a mistake in code. I forgot to call handler of respondWith: Correct:

Relay information to the service worker on install

I have a PWA with multiple different languages and would like to cache only language specific files on install. I can’t find out a way to communicate the language to the service worker during install. Ideas on how I could do it? My js code to initiate the service worker: My code in the service-worker.js: Answer Variables can be relayed

How to ensure that `self.skipWaiting()` works while allowing POST requests in service worker’s fetch event

I’ve noticed that my service worker doesn’t respond to self.skipWaiting() when there are still tasks to be run. In my service worker’s fetch event, I see various Firebase polls that use HTTP POST requests. If I handle these requests in the service worker like so: Then self.skipWaiting() always works as expected. However, if I do the following: Then self.skipWaiting() seems

Should I return a promise in a JS Service Worker onFetch callback function if I don’t want to do anything with the original request?

My scenario is the following: I have a Progressive Web App that uses a Service Worker where I need to catch the request and do something with it every time the user requests a resource or leaves the current URL I’m handling that through adding a callback to the fetch event of the worker I only care about requested resources

Chrome Extension – Getting CORS error when trying to fetch() from background script with manifest v3

I’m getting a CORS error when I try to do a request from my Chrome Extensions’s background script. The background script is bundled with webpack. Note: If I convert manifest.json to version 2 – all works fine. But with v3 it gives Access to fetch at ‘https://example.com/api/user/login’ from origin ‘chrome-extension://exampleid’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is

Advertisement