]> _ Git - fluidbook-toolbox.git/commitdiff
wait #5956 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 26 May 2023 15:13:59 +0000 (17:13 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 26 May 2023 15:13:59 +0000 (17:13 +0200)
resources/linkeditor/js/linkeditor.loader.js

index c40a701f3ab94ce3bcb76d12d9d1892b0ef20b34..cdcd27d4305028d1d128221c42dc010a510bdc67 100644 (file)
@@ -10,6 +10,7 @@ LinkeditorLoader.prototype = {
         this.pagesSource = 'pages';
         this.rasterizePages = this.linkeditor.utils.splitPages(FLUIDBOOK_DATA.settings.rasterizePages);
         this.vectorPages = this.linkeditor.utils.splitPages(FLUIDBOOK_DATA.settings.vectorPages);
+        this.noCache = '?t=' + (new Date(FLUIDBOOK_DATA.composition_updated_at)).getTime();
     },
 
     loadPage: function (p, side) {
@@ -83,15 +84,15 @@ LinkeditorLoader.prototype = {
         } else {
             if (this.pagesSource === 'pages') {
                 if (this.rasterizePages.indexOf(p) >= 0) {
-                    c += '<img draggable="false" src="raster_' + p + '.' + imageFormat + '" />';
+                    c += '<img draggable="false" src="raster_' + p + '.' + imageFormat + this.noCache + '" />';
                 } else if (this.vectorPages.indexOf(p) >= 0) {
-                    c += '<img draggable="false" src="vector_' + p + '.svg" />';
+                    c += '<img draggable="false" src="vector_' + p + '.svg' + this.noCache + '" />';
                 } else {
-                    c += '<img draggable="false" class="images" src="images_' + p + '.' + imageFormat + '" />';
-                    c += '<img draggable="false" class="texts" src="texts_' + p + '.svg" />';
+                    c += '<img draggable="false" class="images" src="images_' + p + '.' + imageFormat + this.noCache + '" />';
+                    c += '<img draggable="false" class="texts" src="texts_' + p + '.svg' + this.noCache + '" />';
                 }
             } else if (this.pagesSource === 'thumbnails') {
-                c += '<img draggable="false" src="thumbspdf_' + p + '.' + imageFormat + '" />';
+                c += '<img draggable="false" src="thumbspdf_' + p + '.' + imageFormat + this.noCache + '" />';
             }
         }
         c += '</div>';