在我公司,我们通过本地服务器,通过 firefox/chrome/safari,使用以下格式的 URL 访问一些数据库:
http://server_name:port/path
这意味着它不需要前缀 www。或后缀.com。问题是最近浏览器在我们刚启动浏览器或加载新页面时开始自行添加这些,从而使 URL:
http://www.server_name.com:port/path
当然,这不是正确的 URL,它不允许连接到我们的服务器,或者它在进程中间断开我们的连接。有没有办法阻止浏览器自动添加这些?
预先感谢您的帮助!
最佳答案
在 Firefox 14 之前我从来没有遇到过这个问题。我在过去几年中找到的问题的答案是:
In the Location bar, type about:config and press "Enter"
- The about:config "This might void your warranty!" warning page may appear. "Click I'll > be careful, I promise!", to continue to the about:config page.
In the Search field, type "browser.fixup.alternate.enabled"
Double-click the "browser.fixup.alternate.enabled" preference to set its value to false.
这似乎对人们有效,但对我无效。在通过配置搜索后,我找到了 browser.urlbar.autocomplete.enabled。我关闭了它,它成功了。因此,如果前一个不起作用,请尝试:
In the Location bar, type about:config and press "Enter"
- The about:config "This might void your warranty!" warning page may appear. "Click I'll > be careful, I promise!", to continue to the about:config page.
In the Search field, type "browser.urlbar.autocomplete.enabled"
Double-click the "browser.urlbar.autocomplete.enabled" preference to set its value to false.
编辑:禁用
browser.urlbar.autoFill
而不是自动完成也可以解决问题,同时仍然显示历史记录中的建议结果。
关于firefox - 浏览器添加 www.和 .com 自动到服务器地址,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10186383/