Firefox allows the request because it accepts requests to the local file system (i.e. the file:// protocol) if they also come from it. However, Chrome denies all XMLHttpRequests to file:// urls.
Please note that you cannot make an AJAX request to the local file system from an external domain in any browser - this would be a serious security flaw if you could.
For this AJAX request to work in Chrome, you need to make a request to the web server. If you are on Windows, you can easily install IIS or WAMP on your local computer.
Please note that you can enable the setting in Google Chrome, which allows you to query the local file system in the browser, but it is not recommended to use it. If you decide that you want to go further and do it anyway, the guide can be found here .
source share