title: firefox OS Content Security Policy error XHR based application in Index.html?
body: <p>I got this error in console.</p>
  
  <p>Content Security Policy: The page's settings blocked the loading of a resource at self ("script-src app://fa91d835-176d-4fe7-bd06-fe7f57f11b68").</p>
  
  <p>I tried to create a firefox ajax app to retrieve some data from my codeigniter controller. 
  When I check the console it only returns the error. I've only added javascript function outside file. But its saying CSP error. </p>
  
  <p>My Index.Html</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;meta charset="utf-8"&gt;
          &lt;title&gt;Privileged app&lt;/title&gt;
          &lt;meta name="description" content="A privileged app stub"&gt;
   &lt;meta name="viewport" content="width=device-width"&gt;
          &lt;link rel="stylesheet" href="css/app.css"&gt;
  &lt;script type="text/javascript" src="js/app.js" &gt;&lt;/script&gt;
  
          &lt;script type="text/javascript" src="js/jquery-1.7.1.min.js" &gt;&lt;/script&gt;
          &lt;script type="text/javascript" src="js/xhrapp.js" &gt;&lt;/script&gt;
     &lt;link rel="prefetch" type="application/l10n" href="data/locales.ini" /&gt;
          &lt;script type="text/javascript" src="js/libs/l10n.js" &gt;&lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;section&gt;
              &lt;h1 data-l10n-id="app_title"&gt;Privileged empty app&lt;/h1&gt;
              &lt;p data-l10n-id="app_description"&gt;This app is empty. Fill it with your own stuff!&lt;/p&gt;
              &lt;p id="message"&gt;&lt;/p&gt;
              &lt;input type="text" id="ajax_data" value=""&gt;
              &lt;a href="" onclick="xhrapp();"&gt;&lt;button&gt;Click&lt;/button&gt;&lt;/a&gt;
          &lt;/section&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Function xhrapp.js</p>
  
  <pre><code>function xhrapp(){
      var a=$("#ajax_data").val();
      alert(a);
      console.log("in function");
      var xhr = new XMLHttpRequest({
              mozSystem: true
      });
      // xhr.open("POST", "http://blac.byethost7.com/home/index.php/welcome/demo");
      xhr.open("POST", "http://localhost/shop/home/home/demo");
      xhr.send(a);
      xhr.onload = function() {
      if (xhr.status == 200) {
          console.log(xhr.responseText);
          // alert(xhr.responseText);
        }
      };
  
  
  }
  </code></pre>
  
  <p>Please help me!</p>