jquery - Getting doctype error with jsonp -


i giving calls limelight server security parameters added @ end using ajax.

limelight url suppose return html (this expected.)

now issues when fired limelight url in ajax throws error -

syntaxerror: syntax error <!doctype html> 

now can't avoid datatype: jsonp needed in crossdomain call, , can't avoid output happens html5 source.

to simplify -
1) limelight url - http://cdnllnw.xxxxx.com/somefolder/index.html?securityparameter = somehashvalue 2) above url returns html in fiddler , renders html in browser (when used in addressbar)
3) when above url used in ajax -

$.ajax({     url: lmlightlink,     type: 'get',     crossdomain:true,     datatype : 'jsonp',     mimetype: "text/html",     async:false,     success: function (response) {         console.log(response);     },     error: function (response) {         console.info(response);     } }); 

4) throws following error -

syntaxerror: syntax error <!doctype html> 

i had gone through multiple links in none of them suggest perfect solution jsonp , html5 response

any suggestions?

restriction: please note, dont have control on response, can't modify returned html5 code limelight.

edit:

please note can't change datatype = 'html' or else has 'jsonp' otherwise throw following error -

cross-origin request blocked: same origin policy disallows reading remote resource 


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -