3 Ways to Bypass Not Allowed to Load Local Resource Error in Chrome

by Afam Onyimadu
Afam Onyimadu
Afam Onyimadu
Author
Afam is a geek and the go-to among his peers for computer solutions. He has a wealth of experience with Windows operating systems, dating back to his introduction... read more
Affiliate Disclosure
  • You may be restricted from accessing resources when attempting to read XML or JSON data saved in a local file during project testing or creation.
  • This error code is more common on Javascript files, React, as well as file downloads and HTML images.
  • Stored data on your Host DNS cache could mean that you try to access resources to old IPs and hence will not be successful. 
chrome not allowed to load local resource
Instead of fixing issues with Chrome, you can try a better browser: OperaYou deserve a better browser ! 350 million people use Opera daily, a fully-fledged navigation experience that comes with various built-in packages, enhanced resource consumption and great design. Here's what Opera can do:

  • Easy migration: use the Opera assistant to transfer exiting data, such as bookmarks, passwords, etc.
  • Optimize resource usage: your RAM memory is used more efficiently than Chrome does
  • Enhanced privacy: free and unlimited VPN integrated
  • No ads: built-in Ad Blocker speeds up loading of pages and protects against data-mining
  • Download Opera

This article will explore what to do when you get the error – Chrome not allowed to load local resource.

In the early 2010s, the Chrome browser supplanted earlier browsers such as Mozilla Firefox and Internet Explorer as the industry standard, and it currently dominates online browsers.

Google Chrome is quick, simple to use, and has the most extensive addon library of any browser. It is an excellent browser for both business and personal use.

However, as is the case with tech, it comes with its flaws, and users have observed a few errors, including:

This error is not unique to Chrome. In fact, Edge not allowed to load local resources is a common complaint as well. Regardless of the browser, this error has been noticed mainly among users using React, Javascript files, WordPress, as well as in HTML images, and file downloads.

This error is similar to the HTTPS errors in Google Chrome. Let’s get to it.

How do I fix Chrome cannot resolve local resources?

1. Change to Public DNS

  1. Right-click on the Start menu and click on Settings.
  2. On the left pane click on Network & Internet, then scroll down and select Advanced network settings on the right pane.
  3. In the Related settings section, click on More network adapter options.
    chrome not allowed to load local resource
  4. Right-click on your adapter and select Properties.
  5. Select Internet Protocol Version 4 (TCP/IPv4), then click the Properties button.
  6. Under the section for Preferred DNS server, type 8.8.8.8, and for the Alternate DNS server section, type 8.8.4.4, tick Validate settings upon exit and hit OK.
    chrome not allowed to load local resource
  7. Relaunch your browser and try reaccessing the resource.

Updating your network setting’s DNS servers is a simple solution to this problem. For example, you may use any publicly accessible DNS servers on the internet. Lastly, consistently utilize recognized and trusted server addresses when resolving domains for security reasons.

2. Install the Web Server for Chrome extension

  1. Navigate to the extension page for Web Server for Chrome
  2. Click on the Add to Chrome button.
  3. Select the CHOOSE FOLDER button, and select the folder where your project is located.
    chrome not allowed to load local resource
  4. Click on the address in the Web Server URL(s) menu to run the file.

3. Clear your DNS host cache

  1. On your browser, type the address below and hit enter.
    chrome://net-internals/#dns
  2. Click the button to Clear host cache.
  3. Relaunch your browser and try re-accessing the resource.

When you browse the same domain repeatedly, Chrome employs DNS caching to speed up the site’s loading by mapping IP addresses from the cache.

Expert Tip: Some PC issues are hard to tackle, especially when it comes to corrupted repositories or missing Windows files. If you are having troubles fixing an error, your system may be partially broken. We recommend installing Restoro, a tool that will scan your machine and identify what the fault is.
Click here to download and start repairing.

Unfortunately, due to variances in IP addresses, Chrome DNS caching may create delays in loading the webpage when website admins change IP addresses. This is a good fix if your error is caused by JavaScript not allowed to load local resources.

While this error is not exclusive to Chrome, you may try another browser. We love to recommend Opera because it is built on Chromium and has an extensive array of features.

Its UI is also pleasant and it arranges all your most used tools in such a way that they are easily accessible. The browser also offers an extensive repertoire of extensions to enhance customization.

Get Opera

How do I allow local access to Chrome?

  1. Hit the close button to shut down all open instances of your Chrome browser.
    chrome not allowed to load local resource
  2. Open your run dialogue using hotkeys Windows + R.
  3. Type the text below and hit enter.
    chrome.exe --allow-file-access-from-file

You sometimes have to read XML or JSON data saved in a local file during a project’s testing or creation phases of a new site. IIS or even IIS Express, and Visual Studio may be used to execute the test website.

Chrome doesn’t enable javascript to communicate with your local file systems by default, and if you attempt to do so, you will get this error message: XMLHttpRequest cannot load file:///C:/path/to/C:/Temp/testdata.json. Origin null is not allowed by Access-Control-Allow-Origin.

Note that you will have to try a different solution if you are not allowed to load local resource iframe, PHP, HTML, or Jquery.

You should have successfully resolved the error of Chrome not allowed to load local resources. Please note that these solutions are not in any particular order, and you should try whichever seems the easiest to implement.

This isn’t the only resource problem, and many reported Error loading this resource in Chrome message, but that issue can be easily fixed.

idee restoro Still having issues? Fix them with this tool:
  1. Download this PC Repair Tool rated Great on TrustPilot.com (download starts on this page).
  2. Click Start Scan to find Windows issues that could be causing PC problems.
  3. Click Repair All to fix issues with Patented Technologies (Exclusive Discount for our readers).

Restoro has been downloaded by 0 readers this month.

This article covers:Topics: