I would like to use jquery in a file which I open with the file: protocol like this:
file///path/to/file.html
I include jquery like this:
<script
src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
My browser (firefox) tells me, that the CORS headers are missing:
https://developer.mozilla.org/de/docs/Web/HTTP/CORS/Errors/CORSMissingAllowOrigin
It would be great, if I could develop with file:// and jquery.
One use case is for education. If you can test via file: protocol the initial overhead for new comers is much lower (at least I think so, but maybe I am missing something).
from CORS Header if HTML file gets loaded via file:///foo.html?
No comments:
Post a Comment