开发者

Is there a way using jQuery or Javascript to force a page to open in Firefox?

开发者 https://www.devze.com 2023-01-02 05:39 出处:网络
Is there a way using jQuery or Javascript to force a page to open in Firefox?For example, if the user has their default browser set to internet explorer, but they have firefox on their computer - open

Is there a way using jQuery or Javascript to force a page to open in Firefox? For example, if the user has their default browser set to internet explorer, but they have firefox on their computer - open a new firefox window with the inte开发者_如何学Cnded page. If so, I would need to check to see if they have firefox on their machine; otherwise, redirect to the mozilla firefox download site...

any suggestions?


The answer, simply, is no. They don't have file system access like that for security reasons. You can probably imagine what would happen if, say you wrote a program that could crack open QuickBooks and take a look around. If you're worried about compatibility, you can use JavaScript checks to notify them that your page needs to be viewed with Firefox and refuse continuation until they get that settled.

http://www.quirksmode.org/js/detect.html

Or, you know, do it the old fashioned way and build a web page that is cross-browser compatible.

Alternatively, ActiveX might be able to do it, but the user has to accept permissions, and this is highly shady activity.


No. Web browsers do not provide information on other applications installed on a system. It would have security ramifications, such as presenting a fake McAfee antivirus dialog to folks who had McAfee antivirus installed.

0

精彩评论

暂无评论...
验证码 换一张
取 消