Archiv für das Tag "serviceworker"

Resilient Webdesign - Jeremy Keith

Jeremy Keith has published a new book, and anyone who's enjoyed one of his recent talks about the build-in robustness of the core web technologies, and how we managed to cripple it by designing with the wrong focus, might want to read this.
I certainly do, this is very much up my alley.

With a title like Resilient Web Design, you might think that this is a handbook for designing robust websites. This is not a handbook. It’s more like a history book. (…) You won’t find any code in here to

...

Backdoor Service Workers - Jeremy Keith

(…) Just don’t tell the advertising industry about this. (…)adactio.com

Ouch. Good find, Jeremy.

Revisiting the Service Worker / Offline cache

Motivated by the sudden appearance of the "Add to home screen" prompt, I spent the last couple of hours to tune my Service Worker / caching behaviour:

- I can now exclude parts of my site from the service worker. This was an important feature for me, since the WordPress backend didn't sit too well with stubborn cached items.

- I established a number of caches for different items:
-- a "static" cache that has the base css and the page that gets displayed when the network is offline.
-- a "content" cache, that stores up to 25 URLs a visitor has, well, visited, while being online.
-- an "image" cache, that stores up to 45 image files, and finally
-- an "asset" cache for up to 35 files (everything that is not HTML and not an image).

The limits are rather random, but I think each cache has an build-in maximum of 50 entries (?), so to see if it works, I choosed numbers smaller than that.

Linklist - Serviceworker & cache

https://www.w3.org/TR/service-workers/

https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API

https://ponyfoo.com/articles/progressive-networking-serviceworker

https://gist.github.com/adactio/4d588bb8a65fa11a3ea3

https://brandonrozek.com/2015/11/limiting-cache-service-workers-revisited3/

https://ponyfoo.com/articles/progressive-app-serviceworker

https://jakearchibald.com/2016/-best-practices/

The design, the code, 1946 texts, the illustrations, and some photos are made by me.

Motorisiert durch WordPress