Page 2 of 3

Re: Flagfox 6.0 Beta

Posted: Wed Dec 27, 2017 10:22 am
by TonyTough
I don't know if this is intentional or a bug:

When I close and open Firefox 57.02 again (I have always open about 20 tabs) all tabs only show the globe icon and the correct country flag is only shown after I reload each site.
Also when surfing and I go back to previous sites with "back" button, in most cases also only the globe icon is shown and a manual reload is necessary to show the country flag.

Re: Flagfox 6.0 Beta

Posted: Thu Dec 28, 2017 2:43 am
by DaveG
TonyTough wrote:
Wed Dec 27, 2017 10:22 am
When I close and open Firefox 57.02 again (I have always open about 20 tabs) all tabs only show the globe icon and the correct country flag is only shown after I reload each site.
It's a symptom of there being no WebExtension DNS API, and the webRequest API not providing cached IP addresses. If Flagfox is loaded after Firefox has already fetched the resource, then it has no way to get an IP and thus a location.
TonyTough wrote:
Wed Dec 27, 2017 10:22 am
Also when surfing and I go back to previous sites with "back" button, in most cases also only the globe icon is shown and a manual reload is necessary to show the country flag.
I do have a cache in Flagfox that keeps what it needs around for one minute, which is mostly for undo-close-tab and quick navigation. If you've been off of the site for a while, then I have to clear that cache eventually.

Someone else has already filed a Mozilla bug complaining about their API not giving IPs for cached resources, but who knows if they'll ever actually fix it. I'll be filing a bazillion bugs when I'm done with all this, so hopefully I can poke them enough to get this one dealt with, to some degree. For now, if the page is coming from the Firefox cache and Flagfox hasn't seen it recently (or in another tab), then Flagfox won't be able to know its location.

Re: Flagfox 6.0 Beta

Posted: Thu Dec 28, 2017 2:46 am
by DaveG
Follow up, as I just thought of this: I think I can fix the session restore issue (no flags on Firefox start for previously loaded tabs) by setting something for that using the WebExtension session API. I'll look into it. Thanks.

Re: Flagfox 6.0 Beta

Posted: Thu Dec 28, 2017 5:13 am
by DaveG
DaveG wrote:
Thu Dec 28, 2017 2:46 am
Follow up, as I just thought of this: I think I can fix the session restore issue (no flags on Firefox start for previously loaded tabs) by setting something for that using the WebExtension session API. I'll look into it. Thanks.
I gave this a try and... nope. The WebExtension sessions API does not persist data for session restore, because that's the kind of nonsensical API this is. What it really is, is the undo-close-tab/window API, and that's it.

Question, though: when I restore a session on Firefox start, selecting the tab generally causes it to (re)load and be updated, automatically. Is this happening at all for you? My guess is that maybe it does this or not based on settings sent for each server for how long to cache everything, so YMMV.

Bottom line: If I want to cache flags across session restore, I'll have to write my own cache to do so. That's of course very doable, but I'm thinking that I don't actually want to do that, as that'd mean I'd be saving potentially sensitive user browsing information in my own stuff instead of letting Firefox handle its security/privacy properly, by itself. Thinking about it, I might actually have to revise my privacy policy to do that. When I file the litany of bug reports for stuff I've discovered while fighting with this crap API, I'll complain about the sessions API not actually working between sessions. If they change that, then I can implement things properly, but in lieu of that, I think I'll keep the current behavior. That said, once I start caching more stuff (in a future beta), I may be able to have it show some flags for things, if somewhere else loaded the needed stuff inside another tab.

Re: Flagfox 6.0 Beta

Posted: Thu Dec 28, 2017 11:26 am
by DaveG
Flagfox 6.0 beta 3 is now available:
https://flagfox.wordpress.com/2017/12/28/flagfox6b3/

Re: Flagfox 6.0 Beta

Posted: Thu Dec 28, 2017 1:29 pm
by Tomaso
Please tell us that you'll continue to update the XUL/XPCOM version of Flagfox, and make it available somewhere.

Re: Flagfox 6.0 Beta

Posted: Thu Dec 28, 2017 3:33 pm
by DaveG
Tomaso wrote:
Thu Dec 28, 2017 1:29 pm
Please tell us that you'll continue to update the XUL/XPCOM version of Flagfox, and make it available somewhere.
As I've said elsewhere in another thread, my answer to that request is a definitive "maybe". However, it's a complete non-starter until I have Flagfox 6.0 done, released, and working well. Ask me again once I'm done with the current mess.

Re: Flagfox 6.0 Beta 3

Posted: Fri Dec 29, 2017 7:03 pm
by DaveG
212eta wrote:
Fri Dec 29, 2017 12:08 pm
So, what happened [?]
What happened is that many ccTLDs were resold at-will, and they've effectively lost all meaning.
https://en.wikipedia.org/wiki/.nu
Apparently, in addition to sounding like "new" in English, it sounds like a Norwegian word for "now", so both locales used it to make neat domain names... none of which have to do with the small island in the south Pacific named Niue. ;)

I've had a blacklist in Flagfox for ccTLDs that get resold without regard to any nationality for quite a while, and ".nu" is one of the more recent additions. That said, it looks like I previously just used that blacklist for whether to show the notification (which is disabled in the current beta because the WebExtension notification system sucks), not for whether or not to show it in the tooltip at all. If I remember correctly, I don't think I intended for that to change, so it looks like I'll need to fix this. (also, I took the time to add in a giant list of internationalized TLDs that are nation-specific, so I should probably actually be using that new list) Thanks for reporting this. I'll fix it for a future version.
212eta wrote:
Fri Dec 29, 2017 12:08 pm
Is there a need for Domain Name to be listed (as it can already be seen in the address bar)?
I want the info to all be shown together, in the proper context. It's always been in there and I don't intend to remove it. Also, if you navigate to an internationalized domain name, the address bar will show the address in whatever native text is needed for the language, and the Flagfox tooltip will show the official ASCII version of the domain name in punycode, so they're not always shown the same. (though, it looks like that only works in Firefox 57+) I need to find some more examples, but you can test that on this site for the ".рф" registrar (which apparently our current forum software can't tell is a URL): [url]http://кто.рф/eng/[/url]
https://en.wikipedia.org/wiki/Punycode

Re: Flagfox 6.0 Beta

Posted: Fri Dec 29, 2017 10:24 pm
by cigga
Hello Dave,

Is there a possibility of a chromium based version now that you've gone down the webext road?

I alternate between Firefox and Vivaldi and I miss this addon on the latter. The chromium alternatives for Flagfox are baaad.

Re: Flagfox 6.0 Beta

Posted: Sat Dec 30, 2017 7:54 am
by DaveG
cigga wrote:
Fri Dec 29, 2017 10:24 pm
Is there a possibility of a chromium based version now that you've gone down the webext road?
I already updated the FAQ, because this was clearly going to get asked. ;)
https://flagfox.wordpress.com/faq/#googlechrome

Answer: Yes, maybe, but certainly not until after 6.0 is released and things have settled. I'll probably have Firefox for Android support higher on the todo list.