The main jQuery error in IE is not reproducible. What can I do in this situation to solve this error?

I hope to get some help on this issue. Some users in IE report this javascript problem, but I could not recreate it.

In fact, for some class of Windows IE users, the game does not work (or $ .ajax () does not work).

What i know:

  • I changed the ajax call (ajax_init_trainer) and used the standard link with some request parameters to initialize, and ppl seemed to pass the problem on until it hit the next ajax call.

I read somewhere that IE does crazy caching, so you need to make the URL unique, so I added the _requestno parameter. However, setting the cache: false is also said to do this. This did not fix it for someone who complained.

function done(res, status) {
       var data = JSON.parse(res.responseText);
       hide_loading();
       if (status == "success") {
               window.location.href="/bamo/battle/?{{ fb_sig}}";
       }
       else {
           display_alert("Problem!",data.msg,$("#notifications"));
       }
};

$(".monster_select_class").click(function() {
       $(this).attr("src","{{MEDIA_URL}}/bamo/button_select_click.png");
       monster_class = $(this).attr("monster_class");
       monster_type = $(this).attr("monster_type");
       ajax_init_trainer(monster_class,monster_type);
   });

function ajax_init_trainer(trainer_class,monster_type) {
       var data = {trainer_class:trainer_class,monster_type:monster_type};
       var d = new Date();
       var args = { type:"POST",url:"/bamo/api/init_trainer/?_requestno="+d.getTime(),data:data,contentType:"application/json;", dataType: "json",cache:false,complete:done};
       $.ajax(args);
       return false;
};
+3
source share
2 answers

I had a problem like this. It turned out that I installed the server to use text encoding, which IE does not understand: "UTF8". I changed it to "UTF-8" and this solved the problem. This is set in the HTTP response header. If the response header has IE encoding does not recognize, Fttzzt.

I don’t know if this is the problem you are facing, but it is something you can check.

- $.ajax, , IE. http://www.fiddler2.com/fiddler2/

+1

, IE - "." ";" ... , IE 7, ...

: :)

Btw: , , ?

+1

Source: https://habr.com/ru/post/1747463/


All Articles