Web浏览器链接的file://协议是否已终止? [英] Is the file:// protocol for web browser links defunct?

查看:89
本文介绍了Web浏览器链接的file://协议是否已终止?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

文件协议有效吗?

如果Intranet服务器可以生成诸如以下内容的链接,这对我来说将非常有用

It would be extremely useful to me if an intranet server could generate links such as

<a href="file:///shared/customer_info/customer-name">
<a href="file:///shared/customer_info/customer-name/history.ods">

由于它是内部Intranet应用程序,因此服务器和用户的系统共享对同一文件存储的访问权限,因此这很明智.

Since it's an internal intranet app, the server and the users' systems share access to the same filestore, so this is sensible.

不幸的是,Firefox和Chrome禁用了 file://链接.我对它们唯一能做的就是右键单击,复制链接位置,然后将其粘贴到文件管理器位置栏中,甚至粘贴到浏览器自己的位置栏中(在这种情况下,它们工作得很漂亮!)

Unfortunately, Firefox and Chrome have disabled file:// links. The only thing I can do with them is right-click, copy link location, and then paste it into a file manager location bar or even into the browser's own location bar (in which case they work beautifully!)

是否有文件记载的方法可以在浏览器中重新启用它们?最好,如果存在重大安全问题,则有选择地进行处理,以便仅作用于来自本地网络上服务器的 file://链接.

Is there a documented way to re-enable them on the browser? Preferably, if there are major security issues, selectively, so that only file:// links coming from a server on the local net are acted upon.

((我知道有一个提供此功能的Firefox插件本地文件系统链接",但由于Firefox具有破坏插件的历史,我会犹豫是否要使雇主依赖它.)大多数用户更喜欢Chrome.)

(I'm aware that there's a Firefox plugin "Local filesystem links" that provides some of this functionality, but I'd be hesitant about making my employer dependant on it since Firefox has something of a history of breaking plugins. Also most of the users prefer Chrome. )

推荐答案

没有协议没有失效,但它不是Web协议,这主要是Web浏览器的设计目的. file://在IE和Chrome版本55.0.2883.87中有效,但正如您所说的在Firefox中不起作用.在Windows环境中,文件协议虽然像Web URL一样构造,但实际上只是后台的SMB.它与使用UNC路径相同,但允许您使用超级链接并在浏览器中显示.

No the protocol is not defunct, but it is not a web protocol which is primarily what web browsers were designed for. file:// works in IE and Chrome version 55.0.2883.87 but as you said does not work in Firefox. In a Windows environment, the file protocol, while constructed like a web URL is actually just SMB behind the scenes. Its the same as using a UNC path but allows you to use hyper links and display in a browser.

其主要用例是用于产品安装的本地文档(通常是帮助文件).它允许通过Web浏览器访问文档以及使用文档中的超链接.对于最终用户而言,它实际上就像一个网站,而实际上只是本地文件访问.

Its primary use case is for local documentation for product installations (usually help files). It allows accessing the documentation via a web browser and usage of hyperlinks within the documentation. It effectively appears to the end user like a web site, while in fact its just local file access.

对于Intranet或Internet,我建议设置http链接.虽然 file://可以通过Intranet在某种程度上起作用,但我不建议这样做.特别是,正如您所说,您已经在运行http服务器.

For intranet or Internet I recommend setting up http links. Though file:// can work to some degree via intranet I do not recommend it. Especially, as you stated, you already have an http server running.

这篇关于Web浏览器链接的file://协议是否已终止?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆