Persistent tabId between sessions
Reported by
stinkofl...@gmail.com,
Aug 10 2017
|
||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3153.0 Safari/537.36 OPR/48.0.2670.0 (Edition developer) Steps to reproduce the problem: 1. Create extension with "tabs" permission 2. add background page with an object that stores current tabIds from chrome.tabs.query, it can be array or whatever you want 3. save to local storage that object, and make a function that loads that object for the next session 4. restart browser 5. object will load tabIds from local storage 6. compare current tabIds with the loaded object What is the expected behavior? After restarting browser tabIds should be same from previous session thus, saved data should be useful and correspond between restarts, making extensions that work per tab, possible. What went wrong? tabIds are changed after browser restart. Stored object is useless, because tabIds are from previous session, making tabId useful only for one session. There is no link between sessions, please restore tabId from previous session instead of generating a new random one. Thank you. WebStore page: Did this work before? No Chrome version: 61.0.3153.0 Channel: n/a OS Version: 6.1 (Windows 7, Windows Server 2008 R2) Flash Version: Shockwave Flash 26.0 r0
,
Aug 11 2017
#1, this is a feature request, not a bug report per se. Whether it's possible technically or not, only the chromium developers of extensions API can tell. I think you can simply set the report's component to Platform>Extensions>API and status to Untriaged.
,
Aug 11 2017
@rkalavakuntla, sure, I will post some example on github. @woxxom Other solution would be to add an object to the tab, that could be saved for tab's lifetime and permanent between browser restarts. For example Mozilla is working on something like "SessionStore.setTabValue", that would be a nice alternative for my feature request.
,
Aug 11 2017
Thank you for providing more feedback. Adding requester "rkalavakuntla@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Oct 31 2017
As per C#3, as its Feature Request marking it as untriaged
,
Nov 10 2017
This is an interesting idea. I imagine it could be useful for extensions and potentially other consumers. Extensions just consume the tab id from our session state. sky@ (OWNER of c/b/sessions), is there any logic for reusing tab id across session restarts? I see a comment that says they "may be re-used across sessions", but it's not clear to me when that is guaranteed (if ever) to happen.
,
Nov 10 2017
This is cool that someone is interested in this. I'd love to have persistent tabs Ids after browser restart for my tabs manager extension. My extension: https://gitlab.com/kroppy/TreeTabsNightly/blob/master/bg_ch.js All those listeners must keep track of tabs all the time... This is the only way I found to "recognize" tabs after restart. Seriously annoying. Persistent tabId would solve it all! Just like Firefox which have implemented SessionStore.setTabValue (see comment 3), where I can store my own identifier and even some additional data. It works great, persists after browser restarts and lives until tab is closed (removed) by the user! Implement something... please... please... please...
,
Nov 11 2017
Devlin, I think that comment is just wrong. It would certainly be possible to do this, but it would be a pain. I suspect if we wanted permanence it would make more sense to move to a GUID for the tab-id.
,
Sep 10
As of 2018-06-01, after [1], tab IDs are no longer reused so it should be simple to persist and restore. [1] https://chromium.googlesource.com/chromium/src/+/f61f4ba03f0acc1d8ff3ce91fdf1e201fc770d9b
,
Sep 10
As of 2018-06-01, after [1], tab IDs are no longer reused so it should be simple to persist and restore. [1] https://chromium.googlesource.com/chromium/src/+/f61f4ba03f0acc1d8ff3ce91fdf1e201fc770d9b
,
Oct 12
Now that we have non-reused tab and window IDs, can we persist them so on restore they are kept identical? It will make writing certain types of extensions much easier. I have one that I haven't published because it is very very hacky in how I track which window is the same across restarts. If we properly support it, it will lead to removing a bunch of heuristic code and I would feel comfortable publishing it to the world.
,
Oct 12
From an extensions standpoint, I would very much like to, and don't think there's any particular reason we couldn't (though I don't have the bandwidth to pursue it myself right now). |
||||
►
Sign in to add a comment |
||||
Comment 1 by rkalavakuntla@chromium.org
, Aug 11 2017