mirror of
https://github.com/webbukkit/dynmap.git
synced 2025-02-21 14:21:24 +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',
|
lasttimestamp: '0',
|
||||||
servertime: 0,
|
servertime: 0,
|
||||||
serverday: false,
|
serverday: false,
|
||||||
|
inittime: new Date().getTime(),
|
||||||
followingPlayer: '',
|
followingPlayer: '',
|
||||||
formatUrl: function(name, options) {
|
formatUrl: function(name, options) {
|
||||||
var url = this.options.url[name];
|
var url = this.options.url[name];
|
||||||
@ -467,7 +468,7 @@ DynMap.prototype = {
|
|||||||
if(tile) {
|
if(tile) {
|
||||||
return me.options.tileUrl + me.world.name + '/' + tileName + '?' + tile.lastseen;
|
return me.options.tileUrl + me.world.name + '/' + tileName + '?' + tile.lastseen;
|
||||||
} else {
|
} 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) {
|
registerTile: function(mapType, tileName, tile) {
|
||||||
|
Loading…
Reference in New Issue
Block a user