javascript 不推荐使用 Firefox window.controllers。不要将其用于 UA 检测
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/27368537/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Firefox window.controllers is deprecated. Do not use it for UA detection
提问by user3148225
My website works in Chrome, IE, and Safari, but when I load it in Firefox, Firefox complains saying "window.controllers is deprecated. Do not use it for UA detection." This code is in the OpenLayers API (OpenLayers 2, latest version), so I can't change it. Is there something I can put into my code so that it'll work in Firefox?
我的网站可以在 Chrome、IE 和 Safari 中运行,但是当我在 Firefox 中加载它时,Firefox 抱怨说“window.controllers 已被弃用。请勿将其用于 UA 检测”。此代码位于 OpenLayers API(OpenLayers 2,最新版本)中,因此我无法更改它。有什么我可以放入我的代码中的东西,以便它可以在 Firefox 中工作?
回答by alex91ivanov
That's because of your medieval firefox extension you have installed. LiveHTTPHeaders in my case.
那是因为您安装了中世纪的 Firefox 扩展。就我而言,LiveHTTPHeaders。