Reputation: 324
I have an application where one or more tabs pass "display requests" (i.e. to display data relevant to some data query) to a dedicated tab. That tab is launched using a known window name and the initial HTML written to it using win.document.write
calls. The request data is passed to it using localStorage
and that dedicated tab listens for associated storage
events.
This all works fine, even when running using a local-file protocol (file:///
), ... except in IE11. I have a committent to support IE11 (I don't care about older versions), and the local-file scenario is used by my customers before deploying their working configurations to their websites.
My question is whether there's a reliable alternative mechanism that I can fall back to with IE11 when using file:///
.
My library code has provision for a fall-back mechanism if localStorage
is undefined, but it seems that everything fails. I have tried cookies (obviously using a different type of "nudge" than storage
events) and postMessage
, but all have fallen foul of poorly-documented IE limitations.
My data requests are not of a fixed size but I could happily justify a limitation to about 1K if necessary. Any suggestions for how to pass such textual data would be very welcome.
[UPDATE: I have tried directly manipulating data in the other window object, but it really needs a user-defined (or innocuous) event for synchronisation. Most people would recommend storage
or message
events for that but then I'd be back with the same problem. I have also tried using URL fragments, which at least has its own hashchanged
event, but there are size limits that depend on the user's browser and are not documented in most cases.]
Upvotes: 0
Views: 79