Summary: | Issues with Service Worker on treebo.com | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Kenji Baheux <kenjibaheux> | ||||
Component: | Service Workers | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED INVALID | ||||||
Severity: | Normal | CC: | cdumez, webkit-bug-importer, webkit | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | Safari Technology Preview | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Kenji Baheux
2018-02-18 20:47:13 PST
Someone needs to explain to me how to trigger the offline logic in Chrome. With the latest Chrome Canary, I tried: 1. Load https://www.treebo.com 2. Wait ~10 seconds 3. Reload https://www.treebo.com 4. Wait ~10 seconds 5. Turn off Wifi on my laptop 6. Reload https://www.treebo.com / Or Go to https://www.treebo.com in a new tab -> I get a generic error about having no internet connection Behavior is similar on both Chrome and Safari Technology Preview 49. Treebo is down for me (403)... I'll try again over the weekend and see if Jeffrey is back from vacation. After looking into it some more, it seems like Treebo has a customized service worker that it uses for "mobile" user agents. That service worker script imports https://static.treebo.com/rodimus/build/client/offline/offline.00000002.js which in turn handles the custom offline page for failed navigations. So, the offline fallback wasn't working in Safari TP 49 when I tested because I was using a "desktop" user agent, and the offline fallback script wasn't imported. I just upgraded to Safari TP 50 and explicitly switched my user agent emulation to iOS 11.0 - iPhone, and I was served the service worker script with the extra offline fallback logic. It works as expected when I disabled my internet connection and navigated to the page. I'm not readily able to reproduce the second issue, as it only cropped up once while testing with TP 49. It might have been due to a bug in Safari TP 49 that has since been fixed in Safari TP 50. Marking as resolved as per last comment. |