javascripthtmlgoogle-chrome

How to launch html using Chrome at "--allow-file-access-from-files" mode?


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.

  1. start cmd under windows 7
  2. direct to chrome.exe folder
  3. do this chrome --allow-file-access-from-files file:///C:/test%20-%203.html

Solution

  • Search for the path of your Chrome executable and then, on your cmd, try :

    > "C:\PathTo\Chrome.exe" --allow-file-access-from-files
    

    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 :

    > .\chrome.exe --allow-file-access-from-files