Fix cache issues with workers in firefox

This commit is contained in:
yflory 2018-08-22 15:26:42 +02:00
parent 2259d1b6ac
commit b084b892bd
3 changed files with 303 additions and 294 deletions

View File

@ -19,6 +19,8 @@ var debug = function (msg) { console.log(msg); };
var init = function (client, cb) {
debug('SW INIT');
require(['/api/config?cb=' + (+new Date()).toString(16)], function (ApiConfig) {
if (ApiConfig.requireConf) { require.config(ApiConfig.requireConf); }
require([
'/common/requireconfig.js'
], function (RequireConfig) {
@ -142,6 +144,7 @@ var init = function (client, cb) {
};
});
});
});
};
self.addEventListener('message', function (e) {

View File

@ -19,6 +19,8 @@ var debug = function (msg) { console.log(msg); };
var init = function (client, cb) {
debug('SharedW INIT');
require(['/api/config?cb=' + (+new Date()).toString(16)], function (ApiConfig) {
if (ApiConfig.requireConf) { require.config(ApiConfig.requireConf); }
require([
'/common/requireconfig.js'
], function (RequireConfig) {
@ -143,6 +145,7 @@ var init = function (client, cb) {
};
});
});
});
};
onconnect = function(e) {

View File

@ -7,6 +7,8 @@ localStorage = {
getItem: function (k) { return localStorage[k]; }
};
require(['/api/config?cb=' + (+new Date()).toString(16)], function (ApiConfig) {
if (ApiConfig.requireConf) { require.config(ApiConfig.requireConf); }
require([
'/common/requireconfig.js'
], function (RequireConfig) {
@ -98,3 +100,4 @@ require([
};
});
});
});