I have the following sequence of activity:
1. Populate 2 jsTrees via AJAX (no problem).
2. User drag-n-drops between the trees (no problem).
3. During the copy_node event I update server-side definition of both trees via my own AJAX call to show the moved node as being removed from one tree and placed into the other tree definition (no problem).
4. As the last task in the client-side copy_node event procedure, I refresh the relevant treeView, like this:
$('#inventoryTree').jstree(true).refresh();
During the .refresh() activity is where I observe the following:
In FireFox, the refresh automatically initiates a GET, at which point the server returns HTTP Status 200 OK and all the JSON data from the server - no problem
BUT in Internet Explorer 11 on Windows 7 (I have not tried this in other versions of IE), the GET is issued, but HTTP status 304 NOT Modified is the result; with no call ever going to the server - thus no data returned. The node that was dropped onto the tree then disappears (because apparently jsTree re-loaded the nodes from the previously cached JSON results from the server).
This behavior clearly is something to do with Internet Explorer caching because a work-around is to tell IE to never cache: Internet Options | General Tab | Browsing History section | Settings --> Then select the radio button to check for newer versions of stored pages: "Every time I visit the webpage". After selecting that option, IE actually issues the request to the server, which results in a 200 OK with new JSON data - just like FireFox, which is how it should be.
I'm wondering if there is something jsTree can do to force the call to the server during .refresh() to bypass any cache. Can you add some arbitrary querystring value? Or is there something I can do in my configuration of jsTree?
In case this is relevant, here is how I configure jsTree to load data:
var inventoryUrl = baseURL + 'GetTreeviewNodes?treeName=inventory&locationID=' + locationID;
...
Thanks.