[英]Why does this jQuery not work in IE but in every other browser?
My question is why this code is working in all browsers except of IE function. 我的问题是,为什么此代码可在除IE功能之外的所有浏览器中正常工作。 In the other browsers it works. 在其他浏览器中也可以。
if (phrases.indexOf(currentPhrase)) phrases.splice(phrases.indexOf(currentPhrase), 1); if(phrases.indexOf(currentPhrase))短语.splice(phrases.indexOf(currentPhrase),1);
My guess is that IE is caching the request (since it's through GET
). 我的猜测是IE正在缓存请求(因为它是通过GET
)。 You can fix this in a bunch of ways including cache-control on the server side or using POST
instead. 您可以通过多种方式解决此问题,包括在服务器端进行缓存控制或改用POST
。 jQuery's .load()
is a bit annoying in that you have to use an object as data to indicate you want a POST
request and use a string for GET
instead of allowing you to set an explicit request. jQuery的.load()
有点烦人,因为您必须使用一个对象作为数据来表示您想要POST
请求,并为GET
使用字符串,而不是允许您设置显式请求。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.