mirror of
https://github.com/webbukkit/dynmap.git
synced 2025-02-20 14:01:48 +01:00
Replace "?0" with "?<currentmilliseconds" on default tile URLs to fix browser cache issues between reloads
This commit is contained in:
parent
0fdeee5177
commit
d0e66d7e35
@ -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…
Reference in New Issue
Block a user