service-worker

Requests served from ServiceWorker are downgraded from HTTP/2 to HTTP/1.1

拟墨画扇 提交于 2020-05-08 11:56:57
问题 I found a peculiar issue with service workers which apparently downgrades network request served via the worker to HTTP/1.1 even though the HTTP server is serving via HTTP/2. I have found this on all the sites serving on H2 with ServiceWorkers. I found this on my website and I thought it to be an issue with GatsbyJS. Apparently there is already an issue open which indicates a bug in Chromium. Is this the expected behavior? Where is this specced? Here is a link to my site. 回答1: This is one of

Requests served from ServiceWorker are downgraded from HTTP/2 to HTTP/1.1

旧街凉风 提交于 2020-05-08 11:52:28
问题 I found a peculiar issue with service workers which apparently downgrades network request served via the worker to HTTP/1.1 even though the HTTP server is serving via HTTP/2. I have found this on all the sites serving on H2 with ServiceWorkers. I found this on my website and I thought it to be an issue with GatsbyJS. Apparently there is already an issue open which indicates a bug in Chromium. Is this the expected behavior? Where is this specced? Here is a link to my site. 回答1: This is one of

Service worker - update cache on new version using skipWaiting()

一个人想着一个人 提交于 2020-04-18 06:12:32
问题 I have implemented Workbox to generate my service worker using webpack. This works - I can confirm revision is updated in the generated service worker when running "generate-sw": "workbox inject:manifest" . The problem is - I have noticed my clients are not updating the cache after a new release. Even days after updating the service worker my clients are still caching the old code and new code will only load after several refreshes and/or unregistering the service worker. For each release I

How to cache entire website first login using cache API (Service Worker)

牧云@^-^@ 提交于 2020-04-18 05:46:47
问题 I have a website with a few pages. I know all URL of the website and asserts and its a PHP based. My main objective is in the first login, I want to cache the entire website. Currently, I used SW to caching by navigation, that works fine. What is the better approach? Following is the code I tried. self.addEventListener('install', function (event) { event.waitUntil( caches.open(CACHE_DYNAMIC_NAME) .then(function (cache) { cache.addAll([ '/assets/app/css/vendor.css', '/assets/app/css/app.css',

Caching only images inside of a service worker

狂风中的少年 提交于 2020-04-17 21:52:04
问题 Following is the code for the SW, all working fine. I was caching all the dynamic pages previously, but this was creating me some issues. Like page DOM changes after users interaction are not reflected next time page view. Always it shows original DOM. SO I have needed the only image caching dynamically. I have commented original code which was caching all content. self.addEventListener('activate', function(event) { console.log('[Service Worker] Activating Service Worker ....', event); /

Caching only images inside of a service worker

我的梦境 提交于 2020-04-17 21:51:51
问题 Following is the code for the SW, all working fine. I was caching all the dynamic pages previously, but this was creating me some issues. Like page DOM changes after users interaction are not reflected next time page view. Always it shows original DOM. SO I have needed the only image caching dynamically. I have commented original code which was caching all content. self.addEventListener('activate', function(event) { console.log('[Service Worker] Activating Service Worker ....', event); /

Caching only images inside of a service worker

孤街醉人 提交于 2020-04-17 21:51:34
问题 Following is the code for the SW, all working fine. I was caching all the dynamic pages previously, but this was creating me some issues. Like page DOM changes after users interaction are not reflected next time page view. Always it shows original DOM. SO I have needed the only image caching dynamically. I have commented original code which was caching all content. self.addEventListener('activate', function(event) { console.log('[Service Worker] Activating Service Worker ....', event); /

Progressive Web App on a hosted UWP app does not work with HTTPS (Self-Signed)

一个人想着一个人 提交于 2020-03-05 03:03:54
问题 A PWA Angular App hosted on IIS (HTTPS binding with Self-Signed cert) which is being accessed by an UWP app (Hosted UWP: just a UWP shell pointing to the PWA App). When the package.appxmanifest configurations such as StartPage and Content URIs are pointing to the PWA with HTTP scheme it works well (Except of course the Service Worker registration throws a an error since HTTPS is a requirement). However, when I update the URLs to point to HTTPS the UWP shows only a blank white screen with no

Does my web application require SSL for Firebase Cloud Messaging for Web to work? [closed]

独自空忆成欢 提交于 2020-02-25 04:16:31
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . With Firebase Cloud Messaging for Web, 1. Does my web application domain still require SSL? 2. Or only the service worker.js needs to be on an SSL site? if so, can I host the service worker on an SSL site but keep my web application on a non-SSL site? Any feedback is much

Does my web application require SSL for Firebase Cloud Messaging for Web to work? [closed]

两盒软妹~` 提交于 2020-02-25 04:15:43
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . With Firebase Cloud Messaging for Web, 1. Does my web application domain still require SSL? 2. Or only the service worker.js needs to be on an SSL site? if so, can I host the service worker on an SSL site but keep my web application on a non-SSL site? Any feedback is much