jquery - Is there an Ajax-like javascript technique to send requests with custom scheme urls? -
is there javascript framework/technique allows send asynchronous requests custom scheme urls? trying ajax:
$.ajax({url: "myapp://root", success: function(result){ console.log(result); }}); expectedly gets me below error
xmlhttprequest cannot load myapp://root. cross origin requests supported protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource. i'm trying figure way check whether deep link sent ios app has been received before redirect itunes page. current javascript waits timeout before redirecting itunes, , that's not working intended; dialog pops ask whether user wants open app, , if timeout expires before make decision, still redirected itunes if dialog hasn't been answered/dismissed yet.
here's javascript:
window.location = "myapp://somepath"; settimeout(function() { window.location = "https://itunesurl"; }, 500); obviously increasing timeout not solution i'm looking for.
you can try use ajax request using jsonp.
Comments
Post a Comment