Using service workers across multiple subdomains

前端 未结 3 1300
你的背包
你的背包 2020-12-06 06:06

If my web app consists of more than one subdomain, does that mean I have to have multiple service workers, one for each subdomain? Or can I have one service worker that work

3条回答
  •  悲哀的现实
    2020-12-06 06:44

    Each subdomain is considered a different origin, so yes, you will need to register a service worker for each one. Each of these workers will have its own cache and scope.

提交回复
热议问题