开发者

jQuery: ajax call not received by IE

开发者 https://www.devze.com 2023-02-01 09:36 出处:网络
I have this simple ajax call. It works fine in firef开发者_StackOverflow中文版ox/chrome, returning number of messages sent in a chat enviroment without response. In IE however, the alert is called but

I have this simple ajax call. It works fine in firef开发者_StackOverflow中文版ox/chrome, returning number of messages sent in a chat enviroment without response. In IE however, the alert is called but only returns 0. If I set cache to false, it returns 1..

What might cause this? Is there any known issues regarding this operation in IE using jQuery?


IE will be taking the result from the cache. Since your request URL has not been changed IE interprets it to be the same request and will not fetch data from server.

You can set the cache property to false during the ajax request.

Read more jQuery.ajax( settings )


do you have function foobar() {

}

or

function foobar {

}

pretty sure you need the ()

0

精彩评论

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