cross origin request

cross origin request

BY 27 Feb 2013 Web Application Development

In my application I make a cross origin ajax request, it works well in Tizen’s browser, but when I package it as web application, the cross origin request can’t work.

Could any expert tell me why?

The following is my code:

 

  var url = "";//this is assigned a domain supports cross domain access according to HTML5 specification.

  var client = new XMLHttpRequest();

  client.open("GET", url)

  client.setRequestHeader("Accept-Language", 'en-us');

  client.onreadystatechange = function() { alert("succeed"); }

  client.send();
Written by