Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

about:blank#blocked on <a href="file:///XXX">Link</a> (Markdown Page)

In a Markdown Page (Microsoft TFS Wiki)
I try crate A tag for file link:

<a href="file:///C:/temp\file.txt">file.txt</a>

On click (Chrome), I got

about:blank#blocked

enter image description here

like image 988
Refael Avatar asked Mar 11 '19 11:03

Refael


1 Answers

It's not a Chrome-specific issue with protocol file:, Opera and Firefox display blank page too. When I want to browse HTML files on my localhost, I have to access them via protocol http: instead. For instance when I want to see C:\temp\file.html in Chrome, I will make a virtual directory in my local Apache host:

<VirtualHost *:80>
    DocumentRoot C:/temp
    ServerName temp.localhost
</VirtualHost>

and add this line to %SystemRoot%\System32\drivers\etc\hosts

127.0.0.1 temp.localhost

Now I can see the file in browsers at URL http://temp.localhost/file.html

like image 159
vitsoft Avatar answered Oct 07 '22 12:10

vitsoft