title: XMLHttpRequest and Phonegap... Same Origin Policy or not?
body: <p>I'm still new to Phonegap and I am working with the Android SDK for some days now. At least I wanted to do a <code>XMLHttpRequest</code> to get data from my server. 
  I knew about the Same Origin Policy before and I asked myself, how this should work with a "native app". </p>
  
  <p>I searched the internet and found some topics, where people were telling others, that there is no Same Origin Policy on Phonegap, because it uses the <code>file://</code> protocol and additionally there is a domain whitelist in it's <code>config.xml</code>. </p>
  
  <p>On the other hand there were a bunch of topics of people having problems with XHR's and others told them, that this is because of the Same Origin Policy...</p>
  
  <p>Well, I was confused, but I used my - on regular websites - working <code>XMLHttpRequest</code> snippet and put it into the Phonegap app. I tried the virtual device, but my request is not working. </p>
  
  <p>Now I asked myself some questions:</p>
  
  <ul>
  <li>Who is right? Is there Same Origin Policy on Phonegap or not?</li>
  </ul>
  
  <p>If yes:</p>
  
  <ul>
  <li><p>What function has that domain whitelist?</p></li>
  <li><p>What's the best way to still get the data of my server?</p></li>
  </ul>