TimelineExtension icon indicating copy to clipboard operation
TimelineExtension copied to clipboard

Every tab re-submitted when restoring sessions

Open da2x opened this issue 6 years ago • 3 comments

  1. Set your browser to restore tabs from last session on startup
  2. Open a few choice web pages in different tabs
  3. Restart the browser
  4. Wait 8 seconds

Expected: Only newly opened tabs should be sent to Timeline.

Actual: Every tab from the previous session is resubmitted at the same time.

da2x avatar Jul 15 '18 12:07 da2x

How would we go about implementing this?

DominicMaas avatar Jul 15 '18 19:07 DominicMaas

Block submissions for non-active tabs for the first 30 seconds after startup except for active/focused tabs. The tab object is available as the sendMessage sender so you can check which tab is active there without requeing tabs permission or complexity. Just add a boolen in background.ja called allowBackgroundTabSubmissions set to false, and flip it to true after a timeout.

Would normally submit background tabs, but just inoring these at startup should fix this issue. If the first thing you do is open a page and open ten background tabs, you might loose some submissions. Could also look at the tab creation time; I believe that is also available in the tab object.

da2x avatar Jul 15 '18 19:07 da2x

Was about to make an issue about this for pinned tabs as well as what you mentioned when Chrome restores the tabs you had open last.

Jakosaur avatar Jul 15 '18 20:07 Jakosaur