Tomas Kulhanek

Scientific Software Developer

Follow me on GitHub About me

Enable Fetch Local File

If you open local file e.g. index.html, the browser will use file:// protocol i.e. file:///C:/Projects/index.html However any fetch request will fail due to CORS policy to allow http or https only.

To enable file: protocol to be fetched

  • in Firefox, open about:configand set privacy.file_unique_originto false
  • in Chrome, start with --disable-we-security
  • or in Chrome install Web Server for Chrome extension which server local files via http protocol to chrome or other browsers.
Written on June 11, 2020