469,356 Members | 2,013 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,356 developers. It's quick & easy.

Correct form for file:// URLs (or why don't they work in Firefox?)

I'm using a number of hyperlinks on an Intranet I'm developing which refer
to documents on a network server. The URLs I'm using have the form:
file://<server>/<path>/<file>.pdf

<server> is an UNC path, like: \\hostname

They work perfectly in IE, but not in Opera or Firefox. I can't see any
reason why not - is the form correct? Any other ideas?

--
####################
## PH, London
####################
(crossposted: follow-up to: uk.net.web.authoring)
Jul 23 '05 #1
3 4453
"Philip Herlihy" <fo******@herlihy.eu.veil.com> wrote:
I'm using a number of hyperlinks on an Intranet I'm developing which
refer to documents on a network server. The URLs I'm using have the
form:
file://<server>/<path>/<file>.pdf

<server> is an UNC path, like: \\hostname

They work perfectly in IE, but not in Opera or Firefox. I can't see
any reason why not - is the form correct? Any other ideas?


There is no specification of how file: URLs _should_ work, except for their
overall syntax and the statement that they refer to files in a system-
dependent manner. For a treatise on file: URLs, see
http://www.cs.tut.fi/~jkorpela/fileurl.html

With the given information, it is hardly possible to say what causes the
_browser_ differences. It might be the reverse solidus (backslash)
characters, which violate URL syntax.

Followup-To overridden - I can't see much point in asking in a random set
of newsgroups, three international and one national, and setting followups
to the _national_ group. Of course _none_ of the groups was really the
right one - as so often in crossposting. Hence followups now set to poster.
This means you should think what your problem really is, and start over
after selecting the right group.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 23 '05 #2
"Jukka K. Korpela" <jk******@cs.tut.fi> wrote in message
news:Xn*****************************@193.229.0.31. ..
"Philip Herlihy" <fo******@herlihy.eu.veil.com> wrote:
There is no specification of how file: URLs _should_ work, except for
their
overall syntax and the statement that they refer to files in a system-
dependent manner. For a treatise on file: URLs, see
http://www.cs.tut.fi/~jkorpela/fileurl.html

With the given information, it is hardly possible to say what causes the
_browser_ differences. It might be the reverse solidus (backslash)
characters, which violate URL syntax.

Followup-To overridden - I can't see much point in asking in a random set
of newsgroups, three international and one national, and setting followups
to the _national_ group. Of course _none_ of the groups was really the
right one - as so often in crossposting. Hence followups now set to
poster.
This means you should think what your problem really is, and start over
after selecting the right group.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


Thanks - that's a very useful account. In my case, the browsers appear to
be refusing to follow file:// links from a page fetched using http://,
except for IE, which is happy to oblige. The files are PDFs on a private
network/intranet. Nevertheless, it probably makes sense to serve them from
the webserver in future.

I note your comment on crossposting. One difficulty is framing a sensible
question and another is knowing where to ask - hence the temptation to
crosspost. I was once severely scolded for not putting a "Followup" group
(and yes, that one was chosen at random). Which would you say would have
been the correct single group?

--
####################
## PH, London
####################
Jul 23 '05 #3
Philip Herlihy wrote:
Thanks - that's a very useful account. In my case, the browsers appear to
be refusing to follow file:// links from a page fetched using http://,


This is security behaviour, working as designed.

If you really want to turn it off, set the "security.checkloaduri" pref
to false.

Gerv
Jul 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Dave B | last post: by
6 posts views Thread by James Owens | last post: by
26 posts views Thread by Howard Brazee | last post: by
6 posts views Thread by phillip.s.powell | last post: by
35 posts views Thread by Aaron Gray | last post: by
20 posts views Thread by Daniel Kaplan | last post: by
3 posts views Thread by hd181a | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.