Windows – Cannot open local HTML files with Google Chrome

google-chromewindows 10

I am trying to open a local HTML file but I get an error every time that I do. The error message is as follow:

Error: Windows cannot access the specified device, path, or file. You may not have the appropriate permission to access the item

I have checked the properties of the file and I do have access to everything about it and I have tried other HTML files too. These files open perfectly on Microsoft edge and internet explorer, but not with Chrome. I have updated, repaired and reinstalled google chrome but to no avail. I remember a while back I was tinkering with RegEdit so that may be the issue? I am not 100% sure though as I was not editing Google Chrome files.

Thanks.

Best Answer

Easy way:

  1. Create a new shortcut for chrome.exe.
  2. Right click > Properties
  3. Change Target from "c:\path\to\chrome.exe" to "c:\path\to\chrome.exe" --allow-file-access-from-file. Click OK to save.
  4. Run chrome using this shortcut
  5. Drag & drop html files to open.

https://stackoverflow.com/questions/18586921/how-to-launch-html-using-chrome-at-allow-file-access-from-files-mode

Easier way:

  • If you have python installed, run cmd, change directory to your folder, run python -m http.server
  • Or download Caddy server, run caddy -port 80