这是已知的,不被视为错误.Mozilla 的回应:wontfix解决办法,把websocket server放在SSL下,使用wss://We have a websocket server on port 8080 setup on a Linode box. Chrome and Opera work just fine. Firefox however complains that the operation is insecure."The operation is insecure: Code 18"If I try to create a new WebSocket object in the web console before the page is loaded everything is fine. However, after the page loads something is screwy then I cannot create the object anymore. See the attached screenshot.I have no idea what operation is insecure or even how to go about diagnosing this. 解决方案 I fixed this. The app itself is under SSL but the websocket being accessed is not. Chrome and Opera don't care but Firefox does. According to:https://bugzilla.mozilla.org/show_bug.cgi?id=303952This is known and is not considered a bug. Mozilla's response: wontfixSolution, put websocket server under SSL and use wss:// 这篇关于Firefox Websocket 安全问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-11 06:12