In my documentation web pages, I often need to provide links to locations, files and applications (.xbap) stored on the intranet.
In IE, this works fine with URLs formatted like this:
<a href="file://///company.org/ProjectA/StatsReport">Go to folder</a>
<a href="file://///company.org/ProjectA/Readme.txt">Download file</a>
<a href="file://///company.org/ProjectA/Dashboard.xbap">Run xbap</a>
These links all work fine under IE, but in Firefox they don't.
Does anyone know how I can format the above links to work both in IE and Firefox?
Edit The above link actually work if I put them in a local file. They stop working only in Firefox when they are part of a html file on the network (not on my machine). There must be some kind of security setting in Firefox that prevents file:/// links from working coming from external content?
Paste following link to directly under link button click event, otherwise use javascript to call code behind function
http://msdn.microsoft.com/en-us/library/aa767731
You could check out this link, or you could try using UNC paths.
just use
works in IE, Firefox and Chrome as far as I can tell.
see http://msdn.microsoft.com/en-us/library/aa767731(VS.85).aspx for more info
At least with Chrome, (I don't know about Firefox) You can drag the icon to the left of the URL in the browser to a folder location on your desktop and it will create a file that behaves as an internet shortcut.
I don't know if the file format is universal yet, however Chrome seems to know what to do with it.
The file produced is a
.url
file and contains the following:[InternetShortcut] URL=http://www.accordingtothescriptures.org/prophecy/353prophecies.html
You can replace the URL with anything you'd like.
In case someone else finds this topic while using
localhost
in the file URIs - Internet Explorer acts completely different if the host name islocalhost
or127.0.0.1
- if you use the actual hostname, it works fine (from trusted sites/intranet zone).Another big difference between IE and FF - IE is fine with uris like
file://server/share/file.txt
but FF requires additional slashesfile:////server/share/file.txt
.