javascript - The "right" way to do synchronous HTTP request -
you came here chide me real use case. in world of online education, there scorm courses. have make old scorm courses work on site. scorm courses "web based" , run in browser, expect run in iframe , expect parent supply getvalue method , setvalue. so these scorm courses doing things parent.setvalue("score", "90") , moving on. function supposed return "false" if there issue. scorm comes 90's, , in modern web know have callbacks/promises , http fails "often". might think solution setvalue writes local data , tries , retries until get's through, scorm course typically set move next screen if setvalue worked, shouldn't letting user advance unless setvalue saved on server. tl;dr assuming syncronous request requirement, right way it? so far know of $.ajax({async:false ... browsers warn , sound they're going ignore request synchronous. thinking maybe using websockets or web workers or right way syncronous