Comments (4)
On first load of your site, I don't see a service worker registered. It isn't until I refresh that your service worker loads and is activated. Since it is a bot looking for your SW and it's not loading on the first pass, this could be why your SW isn't being detected.
Update: I have been playing with this for a few more minutes and the behavior is a bit different across browsers and even in incognito. Going to get some more people on the team to mess around with this to double check.
from pwabuilder.
@smoak @Jaylyn-Barbee getting same behaviour in Edge and Kiwi Mobile. After 5-6 refreshes I have finally got the SW in Edge. Clean website data and check your app logic. In Chrome I can't reproduce this... Try to not use windows load event at all in sw registration.
Update: yeah, it's definitely a problem in this event. It's triggers before this code and never executes.
from pwabuilder.
As this is an issue in yalls service worker, I am going to close this issue for now, but please feel free to open a new issue if you make our suggested changes and still hit issues. Thanks for using PWABuilder!
from pwabuilder.
Try to not use windows load event at all in sw registration.
@khmyznikov Can you help me understand why I shouldn't use this? The workbox docs suggests waiting until the page is fully loaded before registering the service worker
Further documentation suggests this as well:
If a service worker precaches anything, then the time at which it's registered matters. Service workers are often registered using inline <script> elements. This means HTML parsers may discover service worker registration code before the page's critical assets have loaded.
This is a problem. A service worker should ideally be performance-neutral in the worst of cases, not make performance worse. Do users a favor and register a service worker when the page's load event fires. This reduces the chance that precaching will interfere with loading a page's critical assets, which in turn means the page can get interactive faster without having to contend with network requests for assets that may not be needed until later anyway.
from pwabuilder.
Related Issues (20)
- [BUG] HOT 1
- [BUG] Unable to package pwa app HOT 4
- A
- [BUG] Could not package my PWA HOT 1
- [BUG] [iOS build] Xcode: Product->Build step fails HOT 1
- [PWA Builder]: Insufficient Target Hit Size for Links and Interactive Elements in PWA Builder Web App HOT 6
- [BUG] Special characters in app name causes problems with pod install HOT 8
- google login with faceID not working HOT 1
- Turn on Azure alerts for our services HOT 1
- [BUG] Can't build PWA for Android for www.bewelcome.org HOT 2
- [Feature] Promote our educational content, like TikTok, on pwabuilder.com HOT 5
- [BUG] Internal server error HOT 4
- [BUG] Report says "You do not have a secure HTTPS server" even though I have a valid SSL certificate HOT 7
- Unable to compile for Android HOT 2
- [BUG] Make sure if the HTTPS tests are timing out that the message is clear to the user HOT 4
- integrate in-app-review HOT 4
- [BUG] progress bar color for ios package should not define background color of progress bar HOT 3
- Installation fails on VS Code 1.25.1 [VSCODE]
- [CLI] Support new Whisper Starter in CLI HOT 1
- [BUG] IOS app faceID login is not working using webAuth HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pwabuilder.