Hacker News new | ask | show | jobs
by lucacasonato 1089 days ago
If you are same origin, you do not require CORS to use type=module. Also type=module works on HTML pages served from file:// (file:///.../index.html).
2 comments

I just tried this and got "Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at file:///home/**.js. (Reason: CORS request not http)" in firefox
It is not possible to do same origin from a file system. Everything served from a file system is considered to be different origins. This drives me bonkers.
Because browser makers only have respect for the bourgeoisie and clear contempt for the proletariat.