Opened 12 years ago

Closed 11 years ago

#3103 closed defect (wontfix)

If you have two opened pages of the same application, then when one saves some information the other will not be able to see the saved data unless the page is reloaded.

Reported by: guest Owned by: bradneuberg
Priority: blocker Milestone: 1.4
Component: Storage/Flash Version:
Keywords: Storage Flash Cc: mg@…
Blocked By: Blocking:

Description (last modified by Brad Neuberg)

There is a very serious bug in Dojo Storage with Flash provider (in MSIE6 and Firefox 1.5). The bug is NOT present in Firefox 2.0 with WHAT WG provider. I have not tested in the MSIE7, but I guess it will not work too. I have used dojo-0.4.3-storage

I think this bug is very serious because if you have two opened pages of the same application, then when one saves some information the other will not be able to see the saved data unless the page is reloaded!

The bug is as follows: if you have two open pages or tabs in the browser, then when one page changes some key value, this change is not "seen" by the other page, unless the other page is reloaded. It other words, different pages write independently in the storage, as if there were two different storages. But then when some page is reloaded it gets the latest key value.


The problem is very easy to spot. First create two html pages, test1.html and test2.html, like this:

test1.html:

<script type="text/javascript" src="dojo-0.4.3-storage/dojo.js"></script>
<div onclick="Add()">Click here to Add</div>

test2.html:

<script type="text/javascript" src="dojo-0.4.3-storage/dojo.js"></script>
<div onclick="Show()">Click here to Show</div>

These pages each have a single div.

The div in the first page, when clicked, calls the function Add; while the div in the second page, when clicked, calls the function Show.

You must also provide the functions Add and Show.

The function Add should increment a counter and write it to the Storage, for example:

i++; dojo.storage.put('name', i, saveHandler); alert(i);

The function Show should just display the value that is in the Storage, for example:

alert(dojo.storage.get('name'));

If you call Add and Show a single time, they will both display the initial counter number. But if you call Add and Show more times, the Show function will always display the initial value, no matter how many times you call Add. However, if the page is reloaded, the Show function will display the latest value. They don't synchronize for long, though. If you click the Add div again, the problem persists.

Change History (3)

comment:1 Changed 12 years ago by bradneuberg

Milestone: 1.1

This is a Flash storage provider related bug; as I've said before many times, I am moving away from personally supporting the Flash area of the system and need volunteers who depend on it to take over bug fixing and support of this area.

comment:2 Changed 11 years ago by bradneuberg

Milestone: 1.11.4

comment:3 Changed 11 years ago by Brad Neuberg

Description: modified (diff)
Resolution: wontfix
Status: newclosed

I don't believe this bug is fixable; it is probably due to limitations in the Flash storage system itself. I don't hold information in memory; I always re-query the Flash storage system when retrieving a value. If Flash doesn't propagate this information between two windows then I can't. I could create a complex system using a Flash LocalConnection? perhaps, but the code bloat this would create does not equal the demand I am hearing for this feature. Marking as WONTFIX.

Note: See TracTickets for help on using tickets.