Having file:// links within a website e.g. http://localhost will not open because of security reason.
In IE and Firefox it's possible to allow such access either in the "Trusted Sites" & "Local Intranet" from IE or to configure a policy in Firefox:
I can't figure out a way in Chrome or Edge.
Searching the web I came across solutions like the --allow-file-access-from-files flag, but that does not work in Chrome 77.0.
Also there are some extensions which enable that behavior:
Enable local file links
I believe there must be some similar way with policies like in Firefox?
EDIT: update 22.03.2021
Chrome Version 89.0.4389.90
Edge Version 89.0.774.57
Result:
Not allowed to load local resource: file:///D:/temp/demo.pdf
Demo HTML:
<html>
<body>
<a href="file://fileserver/demo.pdf">file://fileserver/demo.pdf</a><br/>
<a href="file:///d:/temp/demo.pdf">file:///d:/temp/demo.pdf</a> extra slash according to https://en.wikipedia.org/wiki/File_URI_scheme
</body>
</html>