Replace "?0" with "?<currentmilliseconds" on default tile URLs to fix browser cache issues between reloads
This commit is contained in:
parent
fb08b2fed6
commit
0eda5fc475
1 changed files with 44 additions and 43 deletions
|
|
@ -93,6 +93,7 @@ DynMap.prototype = {
|
|||
lasttimestamp: '0',
|
||||
servertime: 0,
|
||||
serverday: false,
|
||||
inittime: new Date().getTime(),
|
||||
followingPlayer: '',
|
||||
formatUrl: function(name, options) {
|
||||
var url = this.options.url[name];
|
||||
|
|
@ -467,7 +468,7 @@ DynMap.prototype = {
|
|||
if(tile) {
|
||||
return me.options.tileUrl + me.world.name + '/' + tileName + '?' + tile.lastseen;
|
||||
} else {
|
||||
return me.options.tileUrl + me.world.name + '/' + tileName + '?0';
|
||||
return me.options.tileUrl + me.world.name + '/' + tileName + '?' + me.inittime; /* Browser cache fix on reload */
|
||||
}
|
||||
},
|
||||
registerTile: function(mapType, tileName, tile) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue