My Chrome extension saves some data in localStorage, and it needs to do this on a per-tab basis. Using the tab id I get from the API allows me to save the data in a way I need. Unfortunately, if the browser is restarted, tabs seem to get different ids, and my scheme falls apart. Is there a way to identify tabs in a way that survives restarts? The URL is not sufficient, as the same URL can appear in different tabs and should not cause those tabs to be confused.
What's the right pattern for this?