我试图获取一个旧网站的URL,发生了一个错误:
Fetch API cannot load http://xyz.
No 'Access-Control-Allow-Origin' header is present on the requested resource.
Origin 'http://abc' is therefore not allowed access.
If an opaque response serves your needs, set the request's mode to 'no-cors'
to fetch the resource with CORS disabled.
我理解的消息,并试图做一个请求,返回一个不透明的响应:
fetch("http://xyz", {'mode': 'no-cors'})
好的,它现在工作了……但是我看不懂。= \
那么,这种不透明的回应的目的是什么呢?