-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Address Session Storage issue in FDC3 for the web for same domain iframes in a parent window #1430
Comments
The proposed solution is to make use of window names ( Window names persist through navigation events on the same domain (not same origin). Browser will usually delete the name if you navigate off domain, and restore it if you navigate back. This should make We also need to store information for multiple apps and access it before we know the Hence, the proposal is to store the E.g. if we had loaded 2 apps with identityUrls { // n.b. this level isn't really an object but SessionStorage itself
"FDC3-Desktop-Agent-Details-win1": {
"https://mydomain/app1": { ...DesktopAgentDetails },
"https://mydomain/app3": { ... DesktopAgentDetails }
},
"FDC3-Desktop-Agent-Details-win2": {
"https://mydomain/app2": { ...DesktopAgentDetails }
}
} @novavi @robmoffat I believe this would prevent all clashes and ensures that differnet windows are writing to different keys in SessionStorage (in case they happened to do so concurrently, eg. because the parent window was reloaded). Data for different apps that have been loaded in the same window would not be written at the same time (as the iframe can only point to one URL at a time) but the code would need to retrieve and preserve data for other apps. If this works for you can either start work on trying to do this in the implementation OR in the documentation. As we want to get docs signed off and merged ASAP I suspect I should do the latter first. |
Hi @kriswest, The current implementation of this is isolated in a single class, AbstractWebMessaging So you should be able to have a play and come up with something you like. There are also tests: "Recover from SessionState" and "Failed Recovery from SessionState" inside the destop-agent-strategy.feature file |
The implementation work for FDC3 for the Web identified a problem with the use of Session Storage for saving instanceId / instanceUuid: where iframes are used to display apps within the parent window (a common use case for FDC3 for the Web) and theey are on the same domain, they share a Session Storage instance and will overwrite each others data.
An adjustment to the proposed session storage use is needed to ensure that Session Storage for same-domain iframes doesn't collide.
The text was updated successfully, but these errors were encountered: