en.javascript.info icon indicating copy to clipboard operation
en.javascript.info copied to clipboard

Exception for CORS

Open jrvjrv opened this issue 1 year ago • 0 comments

In your page, https://javascript.info/cross-window-communication, an important CORS exception, to me at least, is that the protocol "file:" is always considered to be cross-domain. If you are writing javascript that has to work from a "file:" url, it can't access other local files directly (https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors/CORSRequestNotHttp). You have to use cross-window messaging to talk into/out-of an iframe.

jrvjrv avatar Sep 13 '24 13:09 jrvjrv