From a terminal:
google-chrome --allow-file-access-from-files index.html
From a terminal:
open -a "Google Chrome" index.html --args --allow-file-access-from-files
Note that index.html
must be before --args
.
- Create a copy of the Chrome shortcut on your desktop and rename it
to something like
Chrome (file access)
. - Right-click on the shortcut and choose
Properties
. - Edit the
Target
field by adding--allow-file-access-from-files
after the double quotes ("
). - Close all the Chrome windows and start Chrome through this new shortcut.
- Now you can double-click the
index.html
file.
Note that you can safely remove this desktop shortcut after the end of this class.
- Close all Chrome windows.
- Press Win + R on your keyboard to open the Run dialog box.
- Enter the command
chrome.exe --allow-file-access-from-files
- Now you can double-click the
index.html
file.
- Type "about:config" in the search bar
- If necessary, click on "Accept the Risk and Continue"
- Search for "security.fileuri.strict_origin_policy"
- Double click on
true
to set this parameter tofalse
- Enable the hidden Develop menu through system preferences
- Disable Local File Restrictions
- Press Win + R on your keyboard to open the Run dialog box.
- Enter the command
taskkill /F /IM msedge.exe
(this will close all the open Edge windows) - Press again Win + R to reopen the Run dialog box.
- Enter the command
msedge.exe --allow-file-access-from-files
- Now you can double-click the
index.html
file.
From a terminal:
open -a "Microsoft Edge" index.html --args --allow-file-access-from-files
Note that index.html
must be before --args
.