我正在使用Websync3
,JavaScript API,並在一個頁面上訂閱了大約9個不同的頻道。 Firefox和Chrome沒有任何問題,但是IE9正在拋出一個錯誤提示The request is too large for IE to process properly
。
不幸的是,互聯網幾乎沒有關於此的信息。那麼有沒有人有任何線索來解決這個問題?請求太大,IE無法正常處理
var client = fm.websync.client;
client.initialize({
key: '********-****-****-****-************'
});
client.connect({
autoDisconnect: true,
onStreamFailure: function(args){
alert("Stream failure");
},
stayConnected: true
});
client.subscribe({
channel: '/channel',
onSuccess: function(args) {
alert("Successfully connected to stream");
},
onFailure: function(args){
alert("Failed to connect to stream");
},
onSubscribersChange: function(args) {
var change = args.change;
for (var i = 0; i < change.clients.length; i++) {
var changeClient = change.clients[i];
// If someone subscribes to the channel
if(change.type == 'subscribe') {
// If something unsubscribes to the channel
}else{
}
}
},
onReceive: function(args){
text = args.data.text;
text = text.split("=");
text = text[1];
if(text != "status" && text != "dummytext"){
//receiveUpdates(id, serial_number, args.data.text);
var update = eval('(' + args.data.text + ')');
}
}
});
從WebSync 4開始,JSON-P僅用於IE7及更低版本。 IE8 +中可以使用更新的技術(postMessage,CORS,WebSockets等)。 – Anton