Merge pull request #192 from mikeprimm/master

Replace "?0" in default image URLs with "?<currenttimemillis>" to prevent browser cache issues
This commit is contained in:
mikeprimm 2011-06-02 11:20:51 -07:00
commit 07f16d1cfb

View File

@ -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) {