Tes...">

File: // link does nothing in all browsers

I have a link that looks like this:

<a target="_blank" title="Test" href="file:///c:/test.xls">Test</a>

This link is inside the iframe.

When I click on it (in any major browser), nothing happens. Fiddler does not register traffic. Inserting the URL into the navigation bar works fine - the file download window appears and I can download the file without any problems.

I tried every variant of the URL structure (right and wrong, colons, slashes, backslashes, etc.) that I can think of.

I am sure that this is some kind of security restriction, but I canโ€™t find out for my life what it is or how to get around it. At the moment, I feel pretty stupid. Any simple explanations?

+3
source share
2 answers

Sorry, if you distract this page from the server (chasing it like http: //), the security settings will not allow you to link to local content (acess links like file: //). I had the same problem accessing shared .doc files on a wiki. I never came up with a good solution.

+5
source

Try a colon instead of a pipe;)

0
source

Source: https://habr.com/ru/post/1714820/


All Articles