Question: Currently i load the tabs and open the urls i need to and scrape the data from them.
But that looks shabby and i don't want to open the tabs in front of the user.

There are several chrome extensions which scrape data from web sites but how do they do it without loading the page in a tab.
Loading the url in iframe is not possible bcoz it has an option "CROSS-ORIGIN" in the headers.

Answer: 
If you mean "scrape data from web sites", you can take a look at [XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest), it's a basic web technology and provides client functionality for transferring data between a client and a server.

Besides, when you want to do that in extension, don't forget to [request cross-origin permissions](https://developer.chrome.com/extensions/xhr).
Chrome have written their own documentation on this: 

<https://developer.chrome.com/extensions/background_pages>

You have to register your background page in the extension manifest, and use the extension.getBackgroundPage method to read it

Example:

```
// React when a browser action's icon is clicked.
chrome.browserAction.onClicked.addListener(function(tab) {
var viewTabUrl = chrome.extension.getURL('image.html');
var imageUrl = /* an image's URL */;

// Look through all the pages in this extension to find one we can use.
var views = chrome.extension.getViews();
for (var i = 0; i < views.length; i++) {
var view = views[i];

// If this view has the right URL and hasn't been used yet...
if (view.location.href == viewTabUrl && !view.imageAlreadySet) {

  // ...call one of its functions and set a property.
  view.setImageUrl(imageUrl);
  view.imageAlreadySet = true;
  break; // we're done
}
}
});

```

HTML:

```
<html>
  <script>
    function setImageUrl(url) {
      document.getElementById('target').src = url;
    }
  </script>

  <body>
    <p>
    Image here:
    </p>

    <img id="target" src="white.png" width="640" height="480">

  </body>
</html>

```