Solution: Chrome - No 'Access-Control-Allow-Origin' header is present on the requested resource. 
I was getting the following error testing an application using chrome:

XMLHttpRequest cannot load http://stackoverflow.com/feeds. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access.

The following steps will work around this issue.
  • Steps

    • Step 1: Close all instances of Chrome including open instances in task manager
      Step 1: Close all instances of Chrome including open instances in task manager 

      *** Close all Chrome browsers, then open up task manager and kill all instances of Chrome.

    • Step 2: Create a Chrome shortcut and add --disable-web-security
      Step 2: Create a Chrome shortcut and add --disable-web-security 


      I've created a shortcut to save time, edit the shortcut properties and added the following extra parameter to the end of the target command:

      "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disable-web-security



      If you don't want to create a shortcut, then just open up a dos prompt window and execute the following line:

      "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disable-web-security

  • Sponsors

Comments

Login or Register to add a comment.