Route GuidesRoutes City GuidesCities Map Log in

GPS vs saved route oddness - cacheing issue

2 Dec 2016
by SoreTween
in forum
Find a better bike route. Try our map & route-planner »

Become a supporter

Hi Richard,

This one might be difficult to explain and I've no idea if anything can be done about it or even if it's a real problem.

First create a route and save it.  Next change the route slightly and save it again with the same name.  Close the route and open it again.  At this point I am seeing the original route not the revised one.  This I understand, it's simply a browser cache issue.  If I shift+F5 the page is refreshed from your server and I now see the revised route.

Back up a stage to the point where the route has been revised, saved, closed and reopened but the browser has not been refreshed.  If I ask for a GPS file at that point which route would you expect me to get?  I expected the GPS file to match the saved revised route but it does not, I get a GPS file for the original route.  My expectation of getting the revised route was because the GPS file isn't cached, this is my first request for it so it has to be coming from your server not my cache.

The only explanation I can think of relates to you mentioning in discussions about waypoint limits that the waypoints and hence the route are embedded in the URL my browser requests.  When I request a GPS file does the browser send over 'give me the GPS file for a route from A to F with waypoints BCD and E'? This would be the route I am seeing and could be out of date due to browser cacheing.  Or does my browser say 'give me the GPS file for route number 12345678'?  That should always return the saved route.

I was expecting the latter behaviour and that was because I (wrongly) thought you have to save a route to get the GPS of it just as you have to save before you can print maps to pdf.  In writing this and checking my facts I find I am wrong in believing I must save to get a GPS file.

So now I've realised the mistake is mine why am I not cancelling my post?  If I create a route in the manner described above and download maps, GPS file and turn by turn instructions will all three match?  I think they might not.  The GPS comes from my cached URL I now believe.  The route has to be saved to create maps so logically the maps are created from the saved route, this would lead to the map not matching the GPS in my scenario.  Printing turn by turn does not prompt to save the route so I would expect that to match the GPS.

Am I making any sense at all?



Mon 5 Dec 2016, 09:08

I couldn't repeat the issue with a new route on Friday but this morning I have - you can end up in a state where downloaded maps do not match the downloaded TbT & GPS.

Is there something you can send over that will invalidate the users cache for a page after saving?

Thu 8 Dec 2016, 17:05

I'll have a play and see if I can reproduce this. The GPS files are actually constructed in your browser rather than on the server, so they should always match what you're seeing on-screen. In theory, anyway!

Sun 11 Dec 2016, 09:35

That fits with what I'm seeing and does explain it, the GPS does match what is on screen.  You could put this down entirely to user error but I think you could come in for some serious user ire one day if you do. 

I'm probably exacerbating the issue as I tend to finesse 200km routes in my lunch times at work and download the GPS later at home.  That creates a wide open opportunity for a cache related fail but I have also had the issue where only one computer has been involved. 

My suggestion above of invalidating the browser cache upon saving a route wouldn't work for the two computer scenario I now realise. 

My incorrect expectation was that the GPS route I download is the saved route, it isn't necessarily.  Now I know I can avoid it by making sure after I open a saved route I shift+F5 before downloading a gps file.  Others who do not know will surely get caught out.

Wed 18 Jan 2017, 21:34

I am in the process of trying to plan a 3 week tour of northern Portugal & spain. Unfortunately I don't understand any of the above (sorry) and I am worried that the routes I am making and changing a lot as I go along once I look at the street view or café stops will not download onto GPS properly. How do I best ensure that I get the route that I want?

Thu 19 Jan 2017, 08:41

I have used this mapping system for some time now but I have not had any issues as mentioned (not that I have noticed), but I always save the map I have created before downloading the GPS file usually GPX, I too make many changes after checking the route with street view and used it for a 3 week tour of France last year, excellent system!.

Sat 21 Jan 2017, 11:35

Cycling Lady - don't worry; whatever map you see on screen will be what you get from the GPS button!

SoreTween - when you say "downloaded maps do not match the downloaded TbT & GPS", what do you mean by "downloaded maps"? Is that just the PDF output?

Steve - excellent - really glad it's working for you.

Tue 14 Feb 2017, 18:10

Yes the PDF can mismatch.

The problem stems from my accessing c.t both from home and from work.  Over a period I'll tweak a route in my lunch breaks at work, then a bit more at home, then at work some more then come the day of the ride I'll download the gps from home.  Because by computer at home has seen the route URL before it will have the route in cache but not the latest version.  The gps is created from the cached route not the latest saved route.

Now that I've figured out exactly what is going on the fix is easy, I always press shift-f5 to refresh the page before I continue editing a route or before I download a gps, pdf or TbT.

If you only use one computer to access c.t you will not see the issue.  Nor will it be seen from a computer that has not visited a c.t route before, e.g an internet café one time visit.  It only happens as a result of using more than one PC to make incremental changes to a route.

Tue 25 Apr 2017, 08:13

Thanks Richard,

I'm not seeing 'stale' routes any more when I switch between computers.