title: Developing Chrome Extension. Would like it to get the current website without constant refresh
body: <p>UPDATE: Found <a href="https://stackoverflow.com/questions/6132018/how-can-i-get-the-current-tab-url-for-chrome-extension/17826527#17826527">How can I get the current tab URL for chrome extension?</a></p>
  
  <p>I require the tab.ID to refer to a tab of a specific URL. However not sure if this means me issuing the extension refresh itself constantly (or will the iframe the extension is contained within do this live)?</p>
  
  <p>================</p>
  
  <h1>OP</h1>
  
  <p>I would like to develop a Chrome extension. At this stage of development what I need it to do is 'know' which website it is on. I'm not very experienced with JavaScript (I have some experience developing applications in Java and C, whereas Python is kind of my specialty language and I've deployed a lot of powerful tools using this). </p>
  
  <p>I'm not sure how to go about getting live information of the website the user is currently viewing without constantly refreshing the iframe the application is contained in. I'm thinking of some kind of for loop to do this work for me but I'm also worried about the rate at which this refresh is going to take place (I don't want Chrome to start CPU hogging if many tabs are open).</p>
  
  <p>The framework I'm looking to use during development looks like this (not sure if this is ideal but this is what I have in mind)...</p>
  
  <p>FOR [EXTENSION IFRAME]</p>
  
  <p>{ </p>
  
  <p>Extension page IS Extension_OFFLINE (indicating tab is not on, online_example_page)</p>
  
  <p>Extension page IS Extension_ONLINE (indicating tab is on, online_example page).</p>
  
  <p>}</p>
  
  <p>Such that [EXTENSION IFRAME] actively detects what web-pages you are viewing. I would like to avoid refreshing the extension constantly to get this information if possible.</p>
  
  <p>So what it'll look like is the logo and html page will change depending on whether or not you're connected to the online_example page which could be <a href="https://example.com" rel="nofollow noreferrer">https://example.com</a>.</p>
  
  <p>If the user is on different tabs this is fine. I only need it to detect at least one instance of <a href="https://example.com" rel="nofollow noreferrer">https://example.com</a> (so ideally ranging over all tabs).</p>
  
  <p>Thank you in advance if you're able to help!</p>