javascript - Web application stops after console warning -


i facing problem in web application. whenever 592 console messages not shown. in console window, stops application. not move next.

at starting 1 more warning there synchronous xmlhttprequest on main thread deprecated because of detrimental effects end user's experience. more help, check http://xhr.spec.whatwg.org/.

would please suggest why warning happenedenter image description here , solution this.

let's go point point,

synchronous xmlhttprequest on main thread deprecated because of detrimental effects end user's experience.

this warning comes when try make synchronous ajax call. might have use either simple xmlhttprequest object or jquery make ajax call. why synchronous ajax calls deprecated? read 'async' attribute explanation of 'open' method here.

simple xmlhttprequest object

var xmlhttp = new xmlhttprequest(); xmlhttp.open("get","ajax_info.txt",**true**); // definition: open(method,url,async) xmlhttp.send(); 

using jquery,

$.ajax({         type: "post",         url: "/page/method",         contenttype: "application/json",         data: json.stringify({ parametername: paramvalue }),         async: **true**     }) 

coming error message - 'failed load resource', loud , clear jquery lib file not found on server. fix path or make sure resource available on server @ requested location.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -