Problem Description
<!--ADD by oscar999--><! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 transitional//en" ><HTML><HEAD><TITLE> New Document </ Title><meta name= "Author" content= "oscar999" ><script></script></HEAD><BODY>< A href= "file://xxxx/xxx/" >test</a></BODY></HTML>
The above file is placed in Web server, and when accessed via HTTP, click on link to open the file.
Allowed to load local resource:file//XXXX error is reported in Chrome
Analysis
Test two conditions:
1. Enter File://XXXX directly in the Chrome browser
2. Open the above HTML file directly in Chrome browser.
The file here can be either a local drive letter or a remote file.
Test results, found that both of these conditions are possible. Does not report the above error, but also can access the file normally.
Conclusion
Statckoverflow See the reasons and solutions.
Chrome has made such a setup for security reasons.
It is forbidden to access the local files in this way, it seems that security is guaranteed.
Solution
But for enterprise users, it or the owner of a system, it is necessary to ensure that the company's employees can use the function of the system properly. Modify the system, involving a series of issues such as on-line.
A temporary solution is to install a plugin that allows Chrome to function as normal as IE and Firefox.
This chrome plugin is locallinks.
The installed address is: Https://chrome.google.com/webstore/detail/locallinks/jllpkdkcdjndhggodimiphkghogcpida
Chrome cannot open file error [not allowed to load local resource:file://xxxx]