Chrome extension browser action or page action
===

I'm developing a chrome extension to do the following.

When clicked on the icon, the popup shows the ip address of the currently displayed page.

This extension should work on every page. But the issue is the IP of the current url should have be loaded when the url is loaded. Not when the popup is shown so that there will be no delay between the pop up and getting the IP address via a web service.

So in essence the popup of the extension is different for every tab.

Should this be a page action or a browser action ?

And how do I get the data from the web service in the background and assign it to a popup before it is actually displayed ?


Any info is really appriciated.