Skip to content

Commit 759326f

Browse files
committed
Send fresh data to the diagramming service on every request
1 parent ed9656f commit 759326f

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

script/helpers.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@ function removeDiagramsEditor(handler) {
2525
jQuery('#diagrams-frame').remove();
2626
}
2727

28+
/**
29+
* Explicitly disable caching of the AJAX request.
30+
*/
31+
function disableRequestCaching() {
32+
jQuery.ajaxSetup({
33+
cache: false,
34+
});
35+
}
36+
2837
/**
2938
* check if name/id of new diagram is valid
3039
*

script/service.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ const handleServiceMessages = function( event ) {
1010
return;
1111
}
1212

13+
// some browsers stubbornly cache request data and mess up subsequent edits
14+
disableRequestCaching();
15+
1316
// get diagram info passed to the function
1417
const fullId = event.data.fullId;
1518
const {ns, id} = splitFullId(fullId);

0 commit comments

Comments
 (0)