Financial-Times / n-service-worker

❌ DECOMMISSIONED Global service worker component for next.ft.com
5 stars 2 forks source link

Ideas for precaching hashed assets #12

Open wheresrhys opened 8 years ago

wheresrhys commented 8 years ago
  1. Simple service (backed by redis?) which can be posted urls as part of the deploy-hashed-assets step of master builds. This then serves a JSON listing the most recent 1 or 2 hashed-assets per app (1 if it's oldish, 2 if it's more recent and pages are likely still around using the old asset)

either: n-express polls this and adds an appropriate list to the page as JSON, which is then passed on to the SW using a postMessage or: the client side js, or the sw, hits it on page load (less nice, but also more likely to get the latest info)

For logged in users this would be assets for front, article, stream, my For anon users front, article, stream, barrier, subscribe

Any other ideas? @ironsidevsquincy @matthew-andrews