Does the current system for map loading use browser based caching?
looking at line 91:mapUI.js
Code:
$('LargeMapLink').innerHTML =
' <a href="map.php?gameID='+gameID+'&turn='+newTurn+'&mapType=large" target="blank" class="light">'+
'<img src="'+l_s('images/historyicons/external.png')+'" alt="'+l_t('Open large map')+'" ' +
'title="'+l_t('This button will open the large map in a new window. The large ' +
'map shows all the moves, and is useful when the small map isn\'t clear enough.')+'" /><\/a>';
The innerHTML change seem off firstly, i know the img src= makes a http request, which might just return a HTTP Error 304 - Not modified - letting the browser know to use the cached version. But i think overwriting the innerHTML (instead of say, hiding it, and keeping it in the browser to display again later if the user keeps looking through maps)
Does that make sense? Am i confused about the current state of file caching? does the img src= not download a new file if it is already cached in the browser? (i know there is server side caching, which may actually confuse the HTTP 304 responce, because you don't directly touch the image file, you request the map.php...)
Is there a performance improvement which could be made here?