[Seaside] Service workers

Dave lasmiste at gmail.com
Thu Jul 25 14:29:26 UTC 2019

Hi guys!!

I'm playing with Seaside-REST to implement a PWA
(https://en.wikipedia.org/wiki/Progressive_web_applications). I don't really
know if it is feasible, but I try :-)

The first issue I'm facing is the serviceworker, it seems it does not listen
for fetch requests and I'm guessing because Seaside or Zinc are doing
something under the hood.

This is my code to register the service worker

	<produces: 'application/javascript'>
	^ 'window.onload = () => {
  "use strict";

  if ("serviceWorker" in navigator) {
    console.log("Service Worker registered with scope:",
  }).catch(function(err) {
    console.log("Service Worker registration failed:", err);

And this is the code of the serviceworker

	<produces: 'application/javascript'>
	^ '/* Serve cached content when offline */
*self.addEventListener("fetch",* function(e) {
  console.log("Fetch request for:", e.request.url);

The serviceworker is successfully registered but I'm expecting a log entry
every time I point to an url on my domain, unfortunately that doesn't

I'm mimicking the code of this example
even if I'm trying to further simplifying it

Can you help me, please?

Sent from: http://forum.world.st/Seaside-General-f86180.html

More information about the seaside mailing list