I have the same situation with HERE
And to solve this problem I have to launch html file using Chrome at \"--allow-file-access-from-files\" mode. I tried next steps
Don't do this! You're opening your machine to attacks. Instead run a local server. It's as easy as opening a shell/terminal/commandline and typing
cd path/to/files
python -m SimpleHTTPServer
Then pointing your browser to
http://localhost:8000
If you find it's too slow consider this solution
You may want to try Web Server for Chrome, which serves web pages from a local folder using HTTP. It's simple to use and would avoid the flag, which, as someone mentioned above, might make your file system vulnerable.
As of this writing, in OS X, it will usually look like this
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" --allow-file-access-from-files
If you are a freak like me, and put your apps in ~/Applications
, then it will be
"/Users/yougohere/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" --allow-file-access-from-files
If neither of those are working, then type chrome://version
in your Chrome address bar, and it will tell you what "command line" invocation you should be using. Just add --allow-file-access-from-files
to that.
Well there is quick to run a html which needs permission or blocked by CORS Just simply open the folder using VSCODE and install an extension called "live server"
And then just click on the bottom which says go live, thats it. Screenshot
On windows:
chrome --allow-file-access-from-files file:///C:/test%20-%203.html
On linux:
google-chrome --allow-file-access-from-files file:///C:/test%20-%203.html
If you are using a mac you can use the following terminal command:
open -a Google\ Chrome --args --allow-file-access-from-files