Make service worker very thin, move bundler and transforms out of service worker into a worker living in main app (gist.dumber.app) instead of embedded app (random-id.gist.dumber.app).
Because random-id... host name is very bad for HTTP cache, so we only want a very thin service worker living in the random host name. While majority of the js lives in gist.dumber.app which can be cached by CloudFlare.
Make service worker very thin, move bundler and transforms out of service worker into a worker living in main app (
gist.dumber.app
) instead of embedded app (random-id.gist.dumber.app
).Because
random-id...
host name is very bad for HTTP cache, so we only want a very thin service worker living in the random host name. While majority of the js lives ingist.dumber.app
which can be cached by CloudFlare.