webDip dev coordination forum / public access todo list
It is currently Wed May 23, 2018 1:14 am

All times are UTC

Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Question - map load
PostPosted: Thu Jan 30, 2014 1:23 am 

Joined: Thu Dec 18, 2008 12:24 pm
Posts: 55
Does the current system for map loading use browser based caching?

looking at line 91:mapUI.js
   $('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?

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group