Thursday, November 24, 2011

Cross Domain Access Policy solution using Cross Origin Resource sharing

while making an HTML5 mobile app major problem we face is while integrating it with web services, the reason being Cross Domain access (as our services are on a different domain). The solution to this is given by HTML5 CORS here is the link its w3c Specification. I am using jquery.ajax to call my web services and parse the response and populate the UI. To implement CORS in jquery i found this jquery plugin useful. One more change that we will have to do is on the server where our service is hosted. We would have to add following in response headers Access-Control-Allow-Origin : * Access-Control-Allow-Method : GET, POST, OPTIONS and there you go you have a mobile application that is now capable of making cross domain access. Refrences Demo Link :


  1. Hello,
    The Article on Cross Domain Access Policy solution using Cross Origin Resource sharing is Awesome.It give detail information about it .Thanks For Sharing the information about it. Xamarin Developer

  2. I was reading your web designing post. It was amazing and nice information Great lists that really presents at lot of interesting examples.
    Web development Company in India Company | Web development Company Bangalore
    Web Development Company in Bangalore | Responsive Web development

  3. Nice Post.. really helpful to clear my small concepts. thanks :)Keep doing more, waiting to read your next blog security testing services. Visit here for more information about Vulnerability assessment services and penetration testing services.