My question is why this code is working in all browsers except of IE function. In the other browsers it works.
if (phrases.indexOf(currentPhrase)) phrases.splice(phrases.indexOf(currentPhrase), 1);
My guess is that IE is caching the request (since it's through GET
). You can fix this in a bunch of ways including cache-control on the server side or using POST
instead. 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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.