How to Fix ‘Not allowed to load local resources’ error in Chrome?

The error “not allowed to load local resource” in Chrome’s console window occurs primarily when the browser application fails to upload an image, CSS file, or script. This issue arises when a webpage in Chrome attempts to load a resource from the local file system using a different domain or protocol. Although there can be several reasons for encountering this error, Chrome’s security restrictions are often the main cause.

There are various other factors that can cause users to encounter the “not allowed to load local resource” error. These include an outdated host cache, cross-origin resource sharing, and file path or URL issues.

To help you address this error, we have prepared an extensive guide outlining the possible causes of the issue and offering detailed solutions for each one.

1. Disable Chrome security settings

Disabling Chrome’s security features can potentially resolve the “not allowed to load resource” error. Chrome has robust security measures by default to safeguard users against malicious activities and unauthorized access to local resources.

However, in specific cases where the error stems from legitimate causes like cross-origin resource sharing or file path issues, temporarily disabling Chrome’s security features can enable successful resource loading. It is crucial to exercise caution and limit the disabling of security features to troubleshooting purposes only, as it may expose the browser and system to potential risks. To disable Chrome’s security settings, follow these steps:

  1. Open Google Chrome on your computer.
  2. In the top-right, click on the three-dot menu button.
  3. From the dropdown menu, select “Settings.”
  4. Click on the “Privacy and Security” section located on the left side of the settings window, and then click on “Security.
  5. Now, click on “No protection (not recommended)” under the Safe Browsing section.
  6. When prompted to, click on the Turn-off button.
  7. Repeat these steps if you want to revert in the future.
  8. After making the necessary changes, close the Settings tab.
  9. Chrome will now have the security measures disabled as per your modifications.

2. Change the DNS settings

DNS settings can be a potential cause of the ‘not allowed to load resource’ error in certain scenarios. When DNS settings have problems like incorrect configurations, misconfigured DNS servers, or DNS resolution failures, they can prevent the browser from correctly resolving the domain name associated with the resource.

Consequently, the browser deems the resource as ‘not allowed to load’ due to its inability to establish a valid connection. Follow these steps to change DNS settings to rectify this error:

  1. Press the Windows + R keys simultaneously to open the run dialogue box.
  2. Type “ncpa.cpl” in the Run dialog search box and press the Enter key. This will open the Network Connection window.
  3. Select the network adapter you’re using and click on the Properties button as shown in the image below.
  4. Select the “Internet protocol version 4 (TCP/IPv4)” and click on the properties button as shown in the image below.
  5. Now, Click on Use the following DNS server addresses and enter the following IP address
  6. In the preferred DNS server, type 8.8.8.8.
  7. In the alternate DNS server, type 8.8.4.4.
  8. After that, Click on the check mark beside the validate settings upon exit option. 
  9. Save the changes.

3. Clear the host cache

Clearing the host cache can be an effective solution to resolving the “not allowed to load resource” error. When browsing the internet, browsers store information about websites in their cache to improve loading speed. However, if the cache becomes outdated or corrupted, it can hinder the browser’s ability to fetch and load resources correctly. By clearing the host cache, the browser discards the outdated information and retrieves fresh data, allowing it to properly load the resources and potentially resolve the error.

  1. Open Chrome.
  2. In the address bar, paste the following address
    chrome://net-internals/#dns
  3. Now, Click on the Clear Host cache button.
  4. Relaunch the browser.

Check if the issue’s been resolved, if not continue to the next step.

4. Set up an HTTP server 

Setting up an HTTP server can help resolve the “not allowed to load resource” error in certain cases. Hosting the resources on an HTTP server enables them to be accessed using the appropriate domain and protocol, bypassing the restrictions imposed by the browser. This allows the resources to load successfully, resolving the error and ensuring proper functionality of the web page. Here’s how to do it:

  1. Click here to download the extension. 
  2. Click on the Add to Chrome button.
  3. When prompted to, Click on Add app button.
  4. Once installed, open the application. The application can be found at this address “chrome://apps/”
  5. Click on the Choose folder button and navigate to your project folder.
  6. Click on the URL to run the project.
  7. This will definitely resolve your problem.
ABOUT THE AUTHOR

Dawood Janjua


Dawood Janjua is a highly skilled technology enthusiast with a wealth of knowledge in Windows troubleshooting and gaming. He holds a CCNA certification and has a proven track record of providing exceptional support to customers. While currently working as an author, Dawood aspires to obtain the prestigious CCIE certification in the future to expand his technical expertise and provide regional-level support. With his passion for gaming and expertise in technology, Dawood is committed to sharing his knowledge with the community to help others improve their skills and knowledge in the field.