3 Ways to Bypass Not Allowed to Load Local Resource Error in Chrome
Your network settings might cause this error in Chrome
5 min. read
Updated on
Read the affiliate disclosure page to find out how can you help Windows Report effortlessly and without spending any money. Read more
Key notes
- 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.Â
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.
This error is similar to the HTTPS errors in Google Chrome. So let’s get to it.
What does not loading local resources mean?
When you get this error, it restricts you from viewing specific websites, web resources, or files.
It is common in some modern browsers where Javascript is disabled by default. Browsers like Chrome may disable this setting because it is associated with malicious attacks.
In other cases, bad network configurations may restrict your access to specific resources, and in such cases, you may have to tweak your network settings.
Whatever the case, you must note that tech also comes with flaws, and you may have to reset your browser or update it to solve the problem.
Other similar problems users have encountered include:
- Chrome not syncing – When Chrome does not sync, you can no longer share similar data across devices.
- Google Chrome not shutting down correctly – This is an error where the browser would no longer shut down when you use the close button.
- Chrome ERR_FILE_NOT_FOUND error – This error is associated with opening new pages or tabs and is often caused by malfunctioning plugins.
- Google Chrome is running slow – This issue means your browser is lagging. It might also be a general PC problem.
This error is not unique to Chrome. Edge not allowed to load local resources is also a common complaint. 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.
Is your current browser using too many PC resources? It's time for an upgrade
Opera GX is the first gaming browser that allows custom control over resources. It lets you set a custom limit for how much RAM and CPU each tab can use.
You can also limit bandwidth usage and benefit from online privacy with a free, unlimited VPN. Enabling battery mode, dark mode and the adblocker can also help load pages faster.
Opera GX
Surf the web error-free with this lightweight browser with customizable performance features!How do I fix not allowed to load local resource?
1. Change to Public DNS
- Right-click on the Start menu and click on Settings.
- On the left pane, click on Network & Internet, then scroll down and select Advanced network settings on the right pane.
- In the Related settings section, click on More network adapter options.
- Right-click on your adapter and select Properties.
- Select Internet Protocol Version 4 (TCP/IPv4), then click the Properties button.
- 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.
- Relaunch your browser and try re-accessing 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
- Navigate to the extension page for Web Server for Chrome
- Click on the Add to Chrome button.
- Select the CHOOSE FOLDER button, and select the folder where your project is located.
- Click on the address in the Web Server URL(s) menu to run the file.
3. Clear your DNS host cache
- On your browser, type the address below and hit enter.
chrome://net-internals/#dns
- Click the button to Clear host cache.
- 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.
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.
How do you fix failed to load resource the server responded with a status of 404 Not Found?
If you are not a server admin, there is nothing you can do other than contact the admin. However, if you manage the server, you should give users appropriate permissions for files, folders, and directories as the case may demand.
Without the correct permissions, the user will be restricted and will get error messages like:
- Not be allowed to load local resource HTML image
- Not allowed to load local resource javascript
- User not allowed to load local resource angular
How do I allow local access to Chrome?
- Hit the close button to shut down all open instances of your Chrome browser.
- Open your run dialogue using hotkeys Windows + R.
- 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.