bartbutenaers / node-red-contrib-blockly

A Node Red node for visual programming a function using Blockly
Apache License 2.0
90 stars 22 forks source link

Script files reloaded multiple times #4

Closed bartbutenaers closed 3 years ago

bartbutenaers commented 6 years ago

When adding N blockly nodes to the Node-Red flow, then the Javascript (and toolbox) files are all loaded N times. See this discussion in the Node-Red forum.

bartbutenaers commented 6 years ago

Now the toolboxes are only loaded once per browser page refresh. However at every page refresh all .js and .xml files are still loaded.

Added this in the blokly.js file, to tell the browser that the file needs to be cached during 1 year: res.set('Cache-Control', 'public, max-age=31557600, s-maxage=31557600'); // 1 year

However it doesn't work. After installing ChromeCacheView, it appears that the files are not cached by Chrome ...

bartbutenaers commented 3 years ago

The entire script loading mechanism has been changed in the release-1.1.0 branch