Open Local Files in Chrome: Bypassing "Not Allowed to Load Local Resource" Error
Encountering the "Not allowed to load local resource" error when attempting to open local files in Google Chrome? Here's an alternative solution that circumvents this restriction:
By default, Chrome's security measures prevent direct access to local files. However, using a simple utility like "Web Server for Chrome" allows you to host local resources on a temporary server. Here's how it works:
Install "Web Server for Chrome"
Configure Server Settings
Access Local Files
Using the Solution
function run() { var URL = "http://127.0.0.1:8000/C:2.jpg"; window.open(URL, null); } run();
The above is the detailed content of How to Open Local Files in Chrome: Bypassing the 'Not Allowed to Load Local Resource' Error?. For more information, please follow other related articles on the PHP Chinese website!