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 many times, but it doesn't work.
- start cmd under windows 7
- direct to chrome.exe folder
- do this
chrome --allow-file-access-from-files file:///C:/test%20-%203.html
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
Then pointing your browser to
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
If you are a freak like me, and put your apps in
~/Applications
, then it will beIf 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.That flag is dangerous!! Leaves your file system open for access. Documents originating from anywhere, local or web, should not, by default, have any access to local file:/// resources.
Much better solution is to run a little http server locally.
--- For Windows ---
The easiest is to install http-server globally using node's package manager:
npm install -g http-server
Then simply run
http-server
in any of your project directories:Eg.
d:\my_project> http-server
Or as prusswan suggested, you can also install Python under windows, and follow the instructions below.
--- For Linux ---
Since Python is usually available in most linux distributions, just run
python -m SimpleHTTPServer
in your project directory, and you can load your page onhttp://localhost:8000
In Python 3 the
SimpleHTTPServer
module has been merged intohttp.server
, so the new command ispython3 -m http.server
.Easy, and no security risk of accidentally leaving your browser open vulnerable.
Search for the path of your Chrome executable and then, on your cmd, try :
Source
EDIT : As I see on your question, don't forget that Windows is a little bit similar to Unix, so when you type "chrome ...", cmd will search for Chrome in the PATH, but in general the Chrome folder isn't on the PATH. Also, you don't specify an extension for your executable... So if you move to Chrome's folder, this command will probably work too :
Quit (force quit) all instances of chrome. Otherwise the below command will not work.
Executing this command in terminal will open Chrome regardless of where it is installed.