本文介绍了服务人员能做些什么,网络工作者不能做什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

服务人员能做什么,网络工作者无法做到?反之亦然?

看起来网络工作者是服务工作者功能的一部分。这是正确的吗?

解决方案



网络工作者

,而Service Workers可以修改网络请求的响应(例如,构建离线应用程序时)。


What can service workers do that web workers cannot? Or vice versa?

It seems that web workers are a subset of the functionality of service workers. Is this correct?

解决方案

There is a big difference in what they are intended for:

Web Workers

Source - Using Web Workers

Service Worker

Source - Service Worker API

So Web Workers are handy to run expensive scripts without causing the user interface to freeze,while Service Workers are useful to modify the response from network requests (for example, when building an offline app).

这篇关于服务人员能做些什么,网络工作者不能做什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 14:37
查看更多