Reading up on the SDK documentations... I found these:
Option 1: Request
The request API . I get a HTML string as a response. However to parse the HTML and extract the relevant table data that I need, I would have to create a DOM element somewhere. Something like this HTML to DOM.
But the addon-sdk guidelines say to open remote content on a content-script. So, why the request module?
Option 2: Page-worker
The page-worker API allows to load pages permanently in the background. For polling puposes, I can repeatedly create a pageworker and destroy it after extracting the required data after certain periods of time.
So, which is a better option? Request or Page-worker? And why should I prefer one over the other? Page-worker creates a document object every time I poll the website. Isn't it a browser intensive task to do this create-DOM-destroy-DOM task repeatedly?
Also, what about location.reload() in this context?