Cross-Origin Resource Sharing (CORS) using JSONP and Web Workers

后端 未结 2 1840
鱼传尺愫
鱼传尺愫 2020-12-22 04:08

I am looking for solution how to get/send the data from/to another domain using JSONP in the Web Workers.

Since the Web Workers have not access to the DOM it is not

2条回答
  •  抹茶落季
    2020-12-22 04:40

    CORS is a specification which has nothing to do with JSONP beyond making it obsolete in newer browsers. It enables cross-domain requests using ordinary XMLHttpRequest calls.

    Here's an overview of how it works and how to use it. It can be used in Firefox 3.5+, Safari 4+, Chrome 3+, Internet Explorer 8+, and anything else using one of the same engines.

提交回复
热议问题