Hi,
Just chiming in here. 🙂
Could you specify ‘not working’? Are you getting errors? Are certain pages unreachable?
Have you checked your PHP logs for relevant errors?
@daanvandenbergh The plugin works fine, no errors at all. But once installed, PWA stops working.
@daanvandenbergh Or rather I should say, a user does not get the “Add To Home Screen” prompt.
As soon as I activate CAOS, PWS stops offering to add to home screen. As soon as I deactivate and delete, PWS does offer.
-
This reply was modified 6 years, 3 months ago by
mddsharp.
Hi,
I’m sorry for the hold up. I haven’t had time to look into this. I will soon, though.
Does CAOS register a service worker?
Hi Weston,
No, it does not. I’m thinking about adding that though. Still, what I don’t get is: why would CAOS break PWA?
Could it be due to the analytics.js script, which requires the window object, which doesn’t exist in a PWA, therefore crashing JavaScript execution?
I don’t see why your analytics.js would impact in any way the registration of the service worker from the PWA plugin. They should be entirely separate. Since they are in separate scripts (the PWA adds an inline script to install the service worker) an error in one should not affect the execution of the other.
Since they are in separate scripts (the PWA adds an inline script to install the service worker) an error in one should not affect the execution of the other.
So, following that logic, if a JS minifier/combiner is active, the execution of the entire file might crash, right?
Oh yes, that could be the case.
Thanks. Lots of people still use that (even when HTTP/2 is active.)
I think I need to write a separate Analytics-script, which works with PWA. Ideally I would be able to detect in PHP if the client is a PWA. Do you know of such a way?