All Questions
Tagged with service-worker javascript
2,145 questions
0
votes
0
answers
11
views
Enable Offline Functionality for Ionic Web App
I'm not a developer, but I do work on some small coding projects for my wife's company. I've built a vehicle inspection SPA app in vanilla JS Ionic. A key requirement is that the app continue to ...
-1
votes
0
answers
11
views
Storing tokens using Cache API in a service worker
I have a project where I need to attach a bearer token onto HTTP requests going to an API. The straightforward way to persist the token is to store it in localStorage and then manually attach it to ...
1
vote
2
answers
42
views
Service worker race condition between message listener and fetch listener
My service worker has a variable to store a secured hash, and injects it into headers for relevant HTTP requests, server app will then compare with its own to make it a secured login.
The hash is ...
0
votes
1
answer
22
views
Reactivate service worker from popup window.onload
I'm working on a chrome extension where the service worker does all the heavy lifting (functionality, authentication, etc.), and the popup handles the UI. It basically works like this the popup script ...
0
votes
1
answer
26
views
Cache Storage vs IndexDB for short lived data
I need to handle a 500MB file upload where the user may be redirected to a login page and later return to resume the upload. To store the file temporarily, options like IndexedDB or CacheStorage seem ...
1
vote
0
answers
50
views
Cache Busting in Flutter Web for New Releases: Issues with Clearing Old Cache
I'm developing a Flutter Web project, and I’m encountering issues with cache busting after deploying new releases. Despite trying multiple solutions, older versions of files (e.g., main.dart.js) seem ...
2
votes
0
answers
46
views
Why am I receiving duplicate push notifications in both PWA and Chrome browser?
I am developing a PWA that uses Push Notifications. The issue I am facing is that when a push notification is sent from the server, the user receives it twice:
Once in the PWA.
Once again in the ...
2
votes
2
answers
158
views
Problem overriding postMessage / onmessage functions in Worker
I want to override the postMessage() function in all Worker created after the override. I am doing this in a browser extension from a content script before page is loaded.
I have tried to simply ...
0
votes
0
answers
84
views
Importing worker for PDFjs-dist in webapp
I'm currently having issues with pdfjs-dist latest version (4.8.69).
In our webapp (react-ts-webpack) we already have an old version of the lib (2.6.347).
As we compile ES5 code for legacy ...
-1
votes
0
answers
41
views
Detect if PWA has been closed
im doing PWA app. How can i detect on frontend if user has closed my app? I do not mean keeping it in background. I want to invoke function on frontend when users close pwa from background processes. ...
0
votes
0
answers
33
views
Issues with Firebase Push Notifications on Web and Mobile App
I am currently implementing Firebase for push notifications on both a website and a mobile app. After successful configuration, the push notifications are functioning properly on the mobile app; ...
0
votes
1
answer
47
views
service worker not working for .tsx/.jsx file in react vite.why?
console.log("service worker");
const OFFLINE_ASSETS = [
"/",
"/src/main.tsx",
"/vite.svg",
`https://encrypted-tbn0.gstatic.com/images?q=tbn:...
0
votes
1
answer
30
views
Why safari ask permision for allow popup on every window.open() after I changed my service worker?
Why safari ask permision for allow popup on every window.open() after I changed my service worker?and doesnot allow to open new tab.This is code of my service-worker.
After update my service worker, ...
0
votes
1
answer
109
views
Reducing blocking time of GTag script
If you can recognise this:
<script src="https://www.googletagmanager.com/gtag/js?id=G-TOKENIDHERE"></script>
It is a heavy file for the first second and so it matters.
What I ...
1
vote
0
answers
68
views
Firebase Cloud Messaging: FCM Token Stops Working After Some Time in React App with Vite
I'm working on a React application using Vite, and I've implemented push notifications using Firebase Cloud Messaging (FCM). Initially, everything works fine—the device receives notifications as ...