Country flag changed on returning to the same tab!

Any feedback, suggestion, bug reports, problems....
Locked
theSkipper
Posts: 1
Joined: Fri Dec 14, 2012 7:30 pm

Country flag changed on returning to the same tab!

Post by theSkipper » Fri Dec 14, 2012 7:59 pm

OK, well I've looked through the FAQs and the blog etc but I can't find anything on this, so here goes ...

I have several tabs open, one of which is http://www.torproject.org, which Flagfox said was hosted in Iceland. After looking at another tab I clicked on the tab to display http://www.torproject.org again ... only to find it was hosted in Austria! Shit, the website moved 000s of miles and I did nothing! Later in the same session I returned to http://www.torproject.org only to find it was now in the USA, but was beginning not to be surprised by this.

Activated Wireshark to try to see what was going on, and was surprised to see a DNS query for http://www.torproject.org. This seemed to happen (sometimes) when I went back to the http://www.torproject.org tab. Now http://www.torproject.org maps onto 5 IP addresses, some of which are (you guessed it) in Iceland, Austria and the USA .. and the order of these in the return DNS answer packet seems to vary. Perhaps Flagfox (or Firefox) is just taking the 1st of these? Perhaps Flagfox doesn't base the flag on the IP address used when the page was first loaded, but does a DNS query when the page is redisplayed?

I am using Flagfox 4.2.4 in Firefox 17 on Ubuntu 11. If you need any more details I'd be happy to supply them - either post on the forum (I'll come back to it) or email me.

Perhaps I've completely misunderstood something well-known, in which case apologies for wasting your time. However, I'd be grateful for a response of some sort. Thanks.

User avatar
DaveG
Flagfox Developer
Posts: 723
Joined: Wed Oct 03, 2007 9:06 pm
Location: Philadelphia, USA

Re: Country flag changed on returning to the same tab!

Post by DaveG » Fri Dec 14, 2012 11:29 pm

Yes, Flagfox does a DNS request on page load and looks up the first IP returned by Firefox, which should generally be the IP Firefox just used as the request should be hitting the DNS cache. There is no API I'm aware of to get the IP used for the connections themselves.

I'm aware of plenty of sites which send people to different servers for load balancing, but this is the first time I've seen one set up to change this quickly. Technically I guess it is true that the next request to the site (e.g. clicking on a link in the page) should be going to the most recently shown IP (I think).

That being said, I'm honestly not aware of the particulars of how this is actually handled in Firefox.

Locked